You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.3 KiB

  1. version: "3.7"
  2. services:
  3. backend:
  4. build:
  5. context: ..
  6. dockerfile: docker/Dockerfile.prod
  7. image: doccano_backend:prod
  8. volumes:
  9. - static_volume:/backend/staticfiles
  10. - media:/backend/media
  11. environment:
  12. ADMIN_USERNAME: "${ADMIN_USERNAME}"
  13. ADMIN_PASSWORD: "${ADMIN_PASSWORD}"
  14. ADMIN_EMAIL: ${ADMIN_EMAIL}
  15. CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq"
  16. DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
  17. ALLOW_SIGNUP: "False"
  18. DEBUG: "False"
  19. DJANGO_SETTINGS_MODULE: "config.settings.production"
  20. depends_on:
  21. - postgres
  22. networks:
  23. - network-backend
  24. - network-frontend
  25. celery:
  26. build:
  27. context: ..
  28. dockerfile: docker/Dockerfile.prod
  29. image: doccano_celery:prod
  30. volumes:
  31. - media:/backend/media
  32. entrypoint: ["/opt/bin/prod-celery.sh"]
  33. environment:
  34. PYTHONUNBUFFERED: "1"
  35. CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq"
  36. DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
  37. DJANGO_SETTINGS_MODULE: "config.settings.production"
  38. depends_on:
  39. - postgres
  40. - rabbitmq
  41. networks:
  42. - network-backend
  43. rabbitmq:
  44. image: rabbitmq:3.8-alpine
  45. environment:
  46. RABBITMQ_DEFAULT_USER: "${RABBITMQ_DEFAULT_USER}"
  47. RABBITMQ_DEFAULT_PASS: "${RABBITMQ_DEFAULT_PASS}"
  48. ports:
  49. - 5672:5672
  50. networks:
  51. - network-backend
  52. nginx:
  53. build:
  54. context: ..
  55. dockerfile: docker/Dockerfile.nginx
  56. environment:
  57. API_URL: "http://backend:8000"
  58. GOOGLE_TRACKING_ID: ""
  59. volumes:
  60. - static_volume:/static
  61. - media:/media
  62. ports:
  63. - 80:8080
  64. depends_on:
  65. - backend
  66. networks:
  67. - network-frontend
  68. postgres:
  69. image: postgres:13.3-alpine
  70. volumes:
  71. - postgres_data:/var/lib/postgresql/data/
  72. environment:
  73. POSTGRES_USER: "${POSTGRES_USER}"
  74. POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
  75. POSTGRES_DB: "${POSTGRES_DB}"
  76. networks:
  77. - network-backend
  78. volumes:
  79. postgres_data:
  80. static_volume:
  81. media:
  82. networks:
  83. network-backend:
  84. network-frontend: