docker-compose.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. version: "3.8"
  2. x-environment: &default-environment
  3. DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
  4. SECRET_KEY: change_me
  5. ENABLE_ORGANIZATION_CREATION: "true"
  6. ENABLE_TEST_API: "true"
  7. DEBUG: "true"
  8. EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"
  9. ENABLE_OBSERVABILITY_API: "true"
  10. CELERY_WORKER_CONCURRENCY: 1
  11. PYTHONBREAKPOINT: "ipdb.set_trace"
  12. x-depends_on: &default-depends_on
  13. - postgres
  14. - redis
  15. x-volumes: &default-volumes
  16. - .:/code
  17. services:
  18. postgres:
  19. image: postgres:16
  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. user: root
  36. command: bin/run-celery-with-beat.sh
  37. depends_on: *default-depends_on
  38. volumes: *default-volumes
  39. environment: *default-environment
  40. #flower:
  41. # build: .
  42. # command: bin/run-flower.sh
  43. # depends_on: *default-depends_on
  44. # volumes: *default-volumes
  45. # environment: *default-environment
  46. # ports:
  47. # - 5555:5555