forked from williamlsh/yapi-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (37 loc) · 872 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (37 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version: "3"
services:
yapi:
image: ghcr.io/williamlsh/yapi-docker:v0.1.0
container_name: yapi
restart: on-failure
environment:
WAIT_HOSTS: mongo:27017
ports:
- 3000:3000
volumes:
- "./config.json:/app/config.json"
depends_on:
- mongo
- yapi-intermediate
yapi-intermediate:
image: ghcr.io/williamlsh/yapi-docker:v0.1.0
command: sh -c "../wait; node --unhandled-rejections=strict server/install.js"
environment:
WAIT_HOSTS: mongo:27017
volumes:
- "./config.json:/app/config.json"
depends_on:
- mongo
mongo:
image: mongo
container_name: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- 127.0.0.1:27017:27017
volumes:
- "dbdata:/data/db"
volumes:
dbdata: