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.

87 lines
1.9 KiB

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