docker-compose.yml 992 B

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