xiaoju-survey/docker-compose.yaml
luch 351f18f255
[Feature] 新增暂停功能以及多表字段升级 (#434)
* feat:新增暂停功能  (#416)

* feat:新增暂停功能

* feat: 修改状态相关功能 (#433)

Co-authored-by: luchunhui <luchunhui@didiglobal.com>

* fix: 修改刷数据逻辑错误和环境变量问题

* fix: 解决lint问题

---------

Co-authored-by: chaorenluo <1243357953@qq.com>
Co-authored-by: luchunhui <luchunhui@didiglobal.com>
2024-09-27 19:52:01 +08:00

39 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: "3.6"
services:
mongo:
image: mongo:4
container_name: xiaoju-survey-mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME} # 默认使用系统的环境变量
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD} # 默认使用系统的环境变量
ports:
- "27017:27017" # 数据库端口
volumes:
- mongo-volume:/data/db # xiaoju-survey-data/db/data:/data/db
networks:
- xiaoju-survey
xiaoju-survey:
image: "xiaojusurvey/xiaoju-survey:1.2.0-slim" # 最新版本https://hub.docker.com/r/xiaojusurvey/xiaoju-survey/tags
container_name: xiaoju-survey
restart: always
ports:
- "8080:80" # API端口
environment:
XIAOJU_SURVEY_MONGO_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@xiaoju-survey-mongo:27017 # docker-compose 会根据容器名称自动处理
links:
- mongo:mongo
depends_on:
- mongo
networks:
- xiaoju-survey
volumes:
mongo-volume:
networks:
xiaoju-survey:
name: xiaoju-survey
driver: bridge