-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
198 lines (190 loc) · 4.88 KB
/
docker-compose.dev.yml
File metadata and controls
198 lines (190 loc) · 4.88 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
version: "3.8"
services:
postgres:
image: postgres:14
ports:
- "5433:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_MULTIPLE_DATABASES=lottery,auth_service
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres:/docker-entrypoint-initdb.d
networks:
- qupot-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
auth-service:
image: node:18
ports:
- "8001:8001"
- "9229:9229"
environment:
- PORT=8001
- NODE_ENV=development
- DB_HOST=postgres
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_NAME=auth_service
depends_on:
postgres:
condition: service_healthy
networks:
- qupot-network
volumes:
- ./package.json:/app/package.json
- ./package-lock.json:/app/package-lock.json
- ./apps/auth-service:/app/apps/auth-service
- ./packages:/app/packages
- /app/node_modules
- /app/apps/auth-service/node_modules
working_dir: /app
command: >
sh -c "npm install &&
cd apps/auth-service &&
npm install &&
npm rebuild bcrypt &&
npm run dev"
profiles:
- auth
lottery-service:
image: node:18
ports:
- "8003:8003"
- "9230:9229"
environment:
- PORT=8003
- NODE_ENV=development
- DB_HOST=postgres
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_NAME=lottery_service
- BLOCKCHAIN_SERVICE_URL=http://blockchain-service:8004
depends_on:
postgres:
condition: service_healthy
blockchain-service:
condition: service_started
networks:
- qupot-network
volumes:
- ./package.json:/app/package.json
- ./package-lock.json:/app/package-lock.json
- ./apps/lottery-service:/app/apps/lottery-service
- ./packages:/app/packages
- /app/node_modules
- /app/apps/lottery-service/node_modules
working_dir: /app
command: >
sh -c "npm install &&
cd apps/lottery-service &&
npm install &&
npm run dev"
profiles:
- lottery
quantum-service:
build:
context: ./apps/quantum-service
dockerfile: Dockerfile
ports:
- "8002:8002"
- "9232:9229"
environment:
- PORT=8002
- ENVIRONMENT=development
networks:
- qupot-network
volumes:
- ./apps/quantum-service:/app/apps/quantum-service
- ./packages:/app/packages
- quantum_venv:/usr/local/lib/python3.11/site-packages
working_dir: /app/apps/quantum-service
profiles:
- quantum
blockchain-service:
image: node:18
ports:
- "8004:8004"
- "9233:9229"
environment:
- PORT=8004
- NODE_ENV=development
- DB_HOST=postgres
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_NAME=blockchain_service
depends_on:
postgres:
condition: service_healthy
networks:
- qupot-network
volumes:
- ./package.json:/app/package.json
- ./package-lock.json:/app/package-lock.json
- ./apps/blockchain-service:/app/apps/blockchain-service
- ./packages:/app/packages
- /app/node_modules
- /app/apps/blockchain-service/node_modules
working_dir: /app
command: >
sh -c "npm install &&
cd apps/blockchain-service &&
npm install &&
npm run dev"
profiles:
- blockchain
api-gateway:
build:
context: .
dockerfile: apps/api-gateway/Dockerfile
ports:
- "8000:8000"
- "9228:9229"
environment:
- NODE_ENV=development
- PORT=8000
- AUTH_SERVICE_URL=http://auth-service:8001
- LOTTERY_SERVICE_URL=http://lottery-service:8003
- QUANTUM_SERVICE_URL=http://quantum-service:8002
- BLOCKCHAIN_SERVICE_URL=http://blockchain-service:8004
volumes:
- ./apps/api-gateway:/app/apps/api-gateway
- ./packages:/app/packagess
- ./package.json:/app/package.json
- ./package-lock.json:/app/package-lock.json
- /app/node_modules
- /app/apps/api-gateway/node_modules
networks:
- qupot-network
depends_on:
- auth-service
- lottery-service
- quantum-service
- blockchain-service
working_dir: /app
command: >
sh -c "npm install &&
cd apps/api-gateway &&
npm install &&
npm run dev"
profiles:
- gateway
networks:
qupot-network:
driver: bridge
volumes:
postgres_data:
node_modules_api_gateway:
node_modules_lottery_service:
node_modules_blockchain_service:
node_modules_auth_service:
quantum_venv:
api_gateway_node_modules:
api_gateway_app_node_modules: