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.

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