feat: 增加镜像扩展部署方式
This commit is contained in:
parent
e665882d25
commit
dd2846bcb1
32
docker-compose.yaml
Normal file
32
docker-compose.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
xiaoju-survey:
|
||||||
|
image: "xiaojusurvey/xiaoju-survey:1.0.0"
|
||||||
|
container_name: xiaoju-survey
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "8080:3000" # API端口
|
||||||
|
environment:
|
||||||
|
xiaojuSurveyMongoUrl: ${xiaojuSurveyMongoUrl} # 默认使用系统的环境变量
|
||||||
|
xiaojuSurveyJwtSecret: surveyEngineJwtSecret
|
||||||
|
xiaojuSurveyJwtExpiresIn: 8h
|
||||||
|
links:
|
||||||
|
- mongo:mongo
|
||||||
|
depends_on:
|
||||||
|
- mongo
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mongo-volume:
|
Loading…
Reference in New Issue
Block a user