2021-05-22 13:47:14 +00:00
|
|
|
version: '2.1'
|
|
|
|
services:
|
|
|
|
# mongo database for yapi
|
|
|
|
mongo:
|
|
|
|
image: mongo:2.8.0
|
|
|
|
container_name: mongo
|
2022-03-16 12:00:31 +00:00
|
|
|
restart: always
|
2021-05-22 13:47:14 +00:00
|
|
|
# volumes:
|
|
|
|
# - ~/data/yapi/mongodb:/data/db #db dir
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
# yapi server
|
|
|
|
yapi:
|
2022-03-16 12:00:31 +00:00
|
|
|
image: yapi:latest
|
|
|
|
build: ./
|
2021-05-22 13:47:14 +00:00
|
|
|
container_name: yapi
|
|
|
|
environment:
|
|
|
|
- ADMIN_EMAIL=master@simaek.com
|
|
|
|
- DB_HOST=mongo
|
|
|
|
- DB_NAME=yapi
|
2022-03-16 12:00:31 +00:00
|
|
|
restart: always
|
2021-05-22 13:47:14 +00:00
|
|
|
ports:
|
|
|
|
- 3000:3000
|
|
|
|
# volumes:
|
|
|
|
# - ~/data/yapi/log/yapi.log:/home/vendors/log # log dir
|
|
|
|
depends_on:
|
|
|
|
- mongo
|
|
|
|
#entrypoint: "sh /yapi/start.sh"
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
networks:
|
|
|
|
backend:
|
|
|
|
name: yapi
|
|
|
|
driver: bridge
|