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.

91 lines
2.2 KiB

  1. version: "3.7"
  2. services:
  3. backend:
  4. build:
  5. context: .
  6. dockerfile: backend/Dockerfile.dev
  7. image: doccano_backend:dev
  8. volumes:
  9. - .:/src
  10. - venv:/root/.local/share
  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: "True"
  19. ports:
  20. - 8000:8000
  21. depends_on:
  22. - postgres
  23. networks:
  24. - network-backend
  25. - network-frontend
  26. celery:
  27. build:
  28. context: .
  29. dockerfile: backend/Dockerfile.dev
  30. image: doccano_celery:dev
  31. volumes:
  32. - .:/src
  33. - venv:/root/.local/share
  34. entrypoint: ["/src/tools/dev-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. depends_on:
  40. - postgres
  41. - rabbitmq
  42. networks:
  43. - network-backend
  44. rabbitmq:
  45. image: rabbitmq:3.8-alpine
  46. environment:
  47. RABBITMQ_DEFAULT_USER: "${RABBITMQ_DEFAULT_USER}"
  48. RABBITMQ_DEFAULT_PASS: "${RABBITMQ_DEFAULT_PASS}"
  49. ports:
  50. - 5672:5672
  51. networks:
  52. - network-backend
  53. frontend:
  54. image: node:16.13.0
  55. command: ["/src/tools/dev-nuxt.sh"]
  56. working_dir: /src/frontend
  57. environment:
  58. API_URL: "http://backend:8000"
  59. volumes:
  60. - .:/src
  61. - node_modules:/src/frontend/node_modules
  62. ports:
  63. - 3000:3000
  64. depends_on:
  65. - backend
  66. networks:
  67. - network-frontend
  68. postgres:
  69. image: postgres:13.3-alpine
  70. volumes:
  71. - postgres_data:/var/lib/postgresql/data/
  72. environment:
  73. POSTGRES_USER: "${POSTGRES_USER}"
  74. POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
  75. POSTGRES_DB: "${POSTGRES_DB}"
  76. networks:
  77. - network-backend
  78. volumes:
  79. postgres_data:
  80. node_modules:
  81. venv:
  82. networks:
  83. network-backend:
  84. network-frontend: