-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (76 loc) · 1.59 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# version: '3.8'
services:
redis:
image: redis
ports:
- '${REDIS_PORT}:${REDIS_PORT}'
mongo:
image: mongo
ports:
- '${MONGO_PORT}:${MONGO_PORT}'
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: example
volumes:
- mongo-data:/data/db
mongo-express:
image: mongo-express
ports:
- '8081:8081'
environment:
# ME_CONFIG_MONGODB_ADMINUSERNAME: root
# ME_CONFIG_MONGODB_ADMINPASSWORD: example
ME_CONFIG_MONGODB_SERVER: mongo
command:
build:
context: ./command
ports:
- '${COMMAND_PORT}:3000'
- '9229:9229' # 添加调试端口
depends_on:
- redis
- mongo
env_file:
- .env
worker:
build:
context: ./worker
ports:
- '${WORKER_PORT}:3000'
- '9230:9229' # 添加调试端口
depends_on:
- redis
- mongo
env_file:
- .env
volumes:
- shared-codes:/usr/src/app/dist/worker/codes
worker-replica-1:
build:
context: ./worker
ports:
- '${WORKER_REPLICA_1_PORT}:3000'
- '9231:9229' # 添加调试端口
depends_on:
- redis
- mongo
env_file:
- .env
volumes:
- shared-codes:/usr/src/app/dist/worker/codes
worker-replica-2:
build:
context: ./worker
ports:
- '${WORKER_REPLICA_2_PORT}:3000'
- '9232:9229' # 添加调试端口
depends_on:
- redis
- mongo
env_file:
- .env
volumes:
- shared-codes:/usr/src/app/dist/worker/codes
volumes:
mongo-data:
shared-codes: