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.

89 lines
2.1 KiB

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