forked from mogland/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (48 loc) · 1021 Bytes
/
docker-compose.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
version: '3'
services:
core:
container_name: mog-core
image: wibuswee/mog-core:latest
command: node /app/core/index.js --redis_host=redis --db_host=db --config=/app/env.yaml
environment:
- TZ=Asia/Shanghai
volumes:
- ./data/mog:/root/.mog
# 挂载配置文件
- type: bind
source: ./env.yaml # 挂载的文件
target: /app/env.yaml
ports:
- '2330:2330'
depends_on:
- db
- redis
links:
- db
- redis
networks:
- mog-network
restart: always
healthcheck:
test: ['CMD', 'curl', '-f', 'http://127.0.0.1:2330/api/ping']
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
db:
container_name: mog-db
image: mongo
volumes:
- ./data/db:/data/db
networks:
- mog-network
restart: always
redis:
image: redis
container_name: redis
networks:
- mog-network
restart: always
networks:
mog-network:
driver: bridge