-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
196 lines (182 loc) · 4.27 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
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
services:
asset-service:
build:
context: ./asset-service # Path to the asset service
dockerfile: Dockerfile
ports:
- "8081:8081" # external HTTP
- "8082:8082" # internal HTTP
- "50051:50051" # gRPC
environment:
- DB_HOST=asset-postgres
- REDIS_HOST=asset-redis
networks:
- app-network
depends_on:
- asset-postgres
- asset-redis
asset-postgres:
image: postgres:latest
container_name: asset-service-pgsql
environment:
POSTGRES_DB: asset-service
POSTGRES_USER: pgsql
POSTGRES_PASSWORD: 123456
ports:
- "5432:5432"
volumes:
- asset_postgres_data:/var/lib/postgresql/data
networks:
- app-network
asset-redis:
image: redis:latest
container_name: asset-service-cache
ports:
- "6379:6379"
volumes:
- asset_redis_data:/data
networks:
- app-network
wallet-service:
build:
context: ./wallet-service # Path to the wallet service
dockerfile: Dockerfile
ports:
- "8083:8081" # external HTTP
- "8084:8082" # internal HTTP
- "50052:50051" # gRPC
environment:
- DB_HOST=wallet-postgres
- REDIS_HOST=wallet-redis
networks:
- app-network
depends_on:
- wallet-postgres
- wallet-redis
- asset-service
wallet-postgres:
image: postgres:latest
container_name: wallet-service-pgsql
environment:
POSTGRES_DB: wallet-service
POSTGRES_USER: pgsql
POSTGRES_PASSWORD: 123456
ports:
- "5433:5432"
volumes:
- wallet_postgres_data:/var/lib/postgresql/data
networks:
- app-network
wallet-redis:
image: redis:latest
container_name: wallet-service-cache
ports:
- "6380:6379"
volumes:
- wallet_redis_data:/data
networks:
- app-network
user-service:
build:
context: ./user-service # Path to the user service
dockerfile: Dockerfile
ports:
- "8085:8081" # external HTTP
- "8086:8082" # internal HTTP
- "50053:50051" # gRPC
environment:
- DB_HOST=user-postgres
- REDIS_HOST=user-redis
networks:
- app-network
depends_on:
- user-postgres
- user-redis
- wallet-service
user-postgres:
image: postgres:latest
container_name: user-service-pgsql
environment:
POSTGRES_DB: user-service
POSTGRES_USER: pgsql
POSTGRES_PASSWORD: 123456
ports:
- "5434:5432"
volumes:
- user_postgres_data:/var/lib/postgresql/data
networks:
- app-network
user-redis:
image: redis:latest
container_name: user-service-cache
ports:
- "6381:6379"
volumes:
- user_redis_data:/data
networks:
- app-network
user-minio:
image: minio/minio:latest
container_name: user-service-minio
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
ports:
- "9000:9000"
- "9001:9001"
volumes:
- ./minio_data:/data
networks:
- app-network
command: server /data --console-address ":9001"
trading-service:
build:
context: ./trading-service # Path to the trading service
dockerfile: Dockerfile
ports:
- "8087:8081" # external HTTP
- "8088:8082" # internal HTTP
- "50054:50051" # gRPC
environment:
- DB_HOST=trading-postgres
- REDIS_HOST=trading-redis
networks:
- app-network
depends_on:
- trading-postgres
- trading-redis
- user-service
trading-postgres:
image: postgres:latest
container_name: trading-service-pgsql
environment:
POSTGRES_DB: trading-service
POSTGRES_USER: pgsql
POSTGRES_PASSWORD: 123456
ports:
- "5435:5432"
volumes:
- trading_postgres_data:/var/lib/postgresql/data
networks:
- app-network
trading-redis:
image: redis:latest
container_name: trading-service-cache
ports:
- "6382:6379"
volumes:
- trading_redis_data:/data
networks:
- app-network
volumes:
asset_postgres_data:
asset_redis_data:
wallet_postgres_data:
wallet_redis_data:
user_postgres_data:
user_redis_data:
trading_postgres_data:
trading_redis_data:
networks:
app-network:
driver: bridge