plsql
version: '3'
services:
# mysql:
# image: mysql
#container_name: mysql8
#restart: always
#ports:
#- "3306:3306"
#environment:
# - MYSQL_ROOT_PASSWORD=root
# MYSQL_DATABASE=SkyWalking
mongo:
image: mongo
container_name: mongo
ports:
- "27017:27017"
environment:
MONGO_INITDB_DATABASE: yapi
# MONGO_INITDB_ROOT_USERNAME: yapi
# MONGO_INITDB_ROOT_PASSWORD: yapi@123
restart: always
volumes:
- ./mongo/data:/data/db:rw
- ./mongo/log:/data/log
- ./mongo/conf:/data/conf
- ./mongo/json:/data/json
command: mongod --dbpath /data/db
yapi:
depends_on:
- mongo
image: jayfong/yapi:latest
container_name: yapi
ports:
- "3000:3000"
volumes:
- ./config/config.json:/yapi/config.json
environment:
YAPI_DB_SERVERNAME: mongo
YAPI_DB_PORT: 27017
YAPI_DB_DATABASE: yapi
config.json
plsql
{
"port": 3000,
"adminAccount": "admin@qq.com",
"db": {
"servername": "mongo",
"DATABASE": "yapi",
"port": 27017
},
"mail": {
"enable": false,
"host": "smtp.163.com",
"port": 465,
"from": "***@163.com",
"auth": {
"user": "***@163.com",
"pass": "*****"
}
},
"ldapLogin": {},
"plugins": []
}