docker-compose.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. version: "3.7"
  2. x-environment: &default-environment
  3. DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
  4. SECRET_KEY: change_me
  5. ENABLE_OPEN_USER_REGISTRATION: "true"
  6. ENABLE_TEST_API: "true"
  7. DEBUG: "true"
  8. EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"
  9. ENABLE_OBSERVABILITY_API: "true"
  10. x-depends_on: &default-depends_on
  11. - postgres
  12. - redis
  13. x-volumes: &default-volumes
  14. - .:/code
  15. services:
  16. postgres:
  17. image: postgres:14
  18. environment:
  19. POSTGRES_HOST_AUTH_METHOD: "trust"
  20. redis:
  21. image: redis
  22. web:
  23. build: .
  24. user: root # Allows for usage of ipdb, apt, etc in dev
  25. command: ./manage.py runserver 0.0.0.0:8000
  26. depends_on: *default-depends_on
  27. volumes: *default-volumes
  28. ports:
  29. - "8000:8000"
  30. environment: *default-environment
  31. worker:
  32. build: .
  33. user: root
  34. command: celery -A glitchtip worker -B -s /tmp/celerybeat-schedule -l INFO
  35. depends_on: *default-depends_on
  36. volumes: *default-volumes
  37. environment: *default-environment