forked from tuana9a/dkhptd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
104 lines (96 loc) · 2.17 KB
/
docker-compose.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: "3.1"
services:
api-gateway:
image: node:16-slim
restart: unless-stopped
env_file:
- api-gateway/.env
volumes:
- ./api-gateway/:/app/
working_dir: /app
command: bash -c "npm install && npx tsc && node dist/index.js"
ports:
- ${API_PORT:-8080:8080}
networks:
net1:
ipv4_address: 172.222.0.2
web:
image: node:16-slim
restart: unless-stopped
working_dir: /app
volumes:
- ./web/:/app/
ports:
- ${WEB_PORT:-4200}:4200
command: bash -c "npm install && npm run dev"
networks:
net1:
ipv4_address: 172.222.0.3
scheduler:
image: node:16-slim
restart: unless-stopped
env_file:
- scheduler/.env
volumes:
- ./scheduler/:/app/
working_dir: /app
command: bash -c "npm install && npx tsc && node dist/index.js"
networks:
net1:
ipv4_address: 172.222.0.4
thoi-khoa-bieu-parser: # OPTIONAL
build:
context: ./thoi-khoa-bieu-parser
dockerfile: Dockerfile
image: tuana9a/dkhptd-thoi-khoa-bieu-parser
restart: unless-stopped
env_file:
- thoi-khoa-bieu-parser/.env
networks:
net1:
ipv4_address: 172.222.0.5
worker:
build:
context: ./worker
dockerfile: Dockerfile
image: tuana9a/dkhptd-worker
restart: unless-stopped
env_file:
- worker/.env
volumes:
- ./worker/:/app/
working_dir: /app
command: bash -c "npm install && npx tsc && ./launch.js"
networks:
net1:
ipv4_address: 172.222.0.6
mongo:
image: mongo:7.0
command:
- --config
- /etc/mongod.conf
env_file:
- mongodb/.env
volumes:
- ./mongodb/data/db:/data/db
- ./mongodb/mongod.conf:/etc/mongod.conf
restart: unless-stopped
networks:
net1:
ipv4_address: 172.222.0.7
rabbitmq:
image: rabbitmq:3.12-management
env_file:
- rabbitmq/.env
restart: unless-stopped
hostname: rabbitmq
volumes:
- ./rabbitmq/data/mnesia:/var/lib/rabbitmq/mnesia
networks:
net1:
ipv4_address: 172.222.0.8
networks:
net1:
ipam:
config:
- subnet: 172.222.0.0/24