docker-compose.yml 1014 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. MEDIA_ROOT: "/tmp/"
  10. EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"
  11. x-depends_on:
  12. &default-depends_on
  13. - postgres
  14. - redis
  15. x-volumes:
  16. &default-volumes
  17. - .:/code
  18. services:
  19. postgres:
  20. image: postgres:13
  21. environment:
  22. POSTGRES_HOST_AUTH_METHOD: "trust"
  23. redis:
  24. image: redis
  25. web:
  26. build: .
  27. user: root # Allows for usage of ipdb, apt, etc in dev
  28. command: ./manage.py runserver 0.0.0.0:8000
  29. depends_on: *default-depends_on
  30. volumes: *default-volumes
  31. ports:
  32. - "8000:8000"
  33. environment: *default-environment
  34. worker:
  35. build: .
  36. command: celery -A glitchtip worker -B -s /tmp/celerybeat-schedule -l INFO
  37. depends_on: *default-depends_on
  38. volumes: *default-volumes
  39. environment: *default-environment