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.

111 lines
3.0 KiB

  1. version: "3.7"
  2. services:
  3. backend:
  4. image: doccano/doccano:backend
  5. volumes:
  6. - static_volume:/backend/staticfiles
  7. - media:/backend/media
  8. - tmp_file:/backend/filepond-temp-uploads
  9. environment:
  10. ADMIN_USERNAME: "${ADMIN_USERNAME}"
  11. ADMIN_PASSWORD: "${ADMIN_PASSWORD}"
  12. ADMIN_EMAIL: ${ADMIN_EMAIL}
  13. CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq"
  14. DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
  15. ALLOW_SIGNUP: "False"
  16. DEBUG: "False"
  17. DJANGO_SETTINGS_MODULE: "config.settings.production"
  18. depends_on:
  19. - postgres
  20. networks:
  21. - network-backend
  22. - network-frontend
  23. celery:
  24. image: doccano/doccano:backend
  25. volumes:
  26. - media:/backend/media
  27. - tmp_file:/backend/filepond-temp-uploads
  28. entrypoint: ["/opt/bin/prod-celery.sh"]
  29. environment:
  30. PYTHONUNBUFFERED: "1"
  31. CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq"
  32. DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
  33. DJANGO_SETTINGS_MODULE: "config.settings.production"
  34. depends_on:
  35. - postgres
  36. - rabbitmq
  37. networks:
  38. - network-backend
  39. flower:
  40. image: doccano/doccano:backend
  41. entrypoint: ["/opt/bin/prod-flower.sh"]
  42. environment:
  43. PYTHONUNBUFFERED: "1"
  44. CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq"
  45. DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
  46. DJANGO_SETTINGS_MODULE: "config.settings.production"
  47. FLOWER_BASIC_AUTH: "${FLOWER_BASIC_AUTH}" # Format "username:password"
  48. depends_on:
  49. - celery
  50. ports:
  51. - 5555:5555
  52. networks:
  53. - network-backend
  54. - network-frontend
  55. rabbitmq:
  56. image: rabbitmq:3.10.7-alpine
  57. environment:
  58. RABBITMQ_DEFAULT_USER: "${RABBITMQ_DEFAULT_USER}"
  59. RABBITMQ_DEFAULT_PASS: "${RABBITMQ_DEFAULT_PASS}"
  60. ports:
  61. - 5672:5672
  62. networks:
  63. - network-backend
  64. nginx:
  65. image: doccano/doccano:frontend
  66. command: >
  67. /bin/sh -c
  68. "envsubst '
  69. $${WORKER_PROCESSES}
  70. '< /etc/nginx/nginx.conf.template
  71. > /etc/nginx/nginx.conf
  72. && nginx -g 'daemon off;'"
  73. environment:
  74. API_URL: "http://backend:8000"
  75. GOOGLE_TRACKING_ID: ""
  76. WORKER_PROCESSES: "auto"
  77. volumes:
  78. - static_volume:/static
  79. - media:/media
  80. ports:
  81. - 80:8080
  82. depends_on:
  83. - backend
  84. networks:
  85. - network-frontend
  86. postgres:
  87. image: postgres:13.3-alpine
  88. volumes:
  89. - postgres_data:/var/lib/postgresql/data/
  90. environment:
  91. POSTGRES_USER: "${POSTGRES_USER}"
  92. POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
  93. POSTGRES_DB: "${POSTGRES_DB}"
  94. networks:
  95. - network-backend
  96. volumes:
  97. postgres_data:
  98. static_volume:
  99. media:
  100. tmp_file:
  101. networks:
  102. network-backend:
  103. network-frontend: