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.

95 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. image: doccano_nginx:prod
  59. environment:
  60. API_URL: "http://backend:8000"
  61. GOOGLE_TRACKING_ID: ""
  62. volumes:
  63. - static_volume:/static
  64. - media:/media
  65. ports:
  66. - 80:8080
  67. depends_on:
  68. - backend
  69. networks:
  70. - network-frontend
  71. postgres:
  72. image: postgres:13.3-alpine
  73. volumes:
  74. - postgres_data:/var/lib/postgresql/data/
  75. environment:
  76. POSTGRES_USER: "${POSTGRES_USER}"
  77. POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
  78. POSTGRES_DB: "${POSTGRES_DB}"
  79. networks:
  80. - network-backend
  81. volumes:
  82. postgres_data:
  83. static_volume:
  84. media:
  85. tmp_file:
  86. networks:
  87. network-backend:
  88. network-frontend: