-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.development.yml
289 lines (272 loc) · 6.8 KB
/
docker-compose.development.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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
version: "3.8"
x-environment: &default-environment
GET_HOSTS_FROM: dns
ENVIRONMENT: development
LOG_LEVEL: TRACE
EVENT_DRIVER: nats
NATS_URL: stan:4222
NATS_CLUSTER_ID: test-cluster
services:
postgres:
container_name: postgres
hostname: postgres
image: postgres:alpine
restart: always
environment:
GET_HOST_FROM: dns
POSTGRES_PASSWORD: itsasecret
networks:
- mononet
ports:
- '5432:5432'
volumes:
- 'pgdata:/var/lib/postgresql/data'
- './config/postgresql/init-postgres.sql:/docker-entrypoint-initdb.d/init-postgres.sql'
stan:
container_name: stan
hostname: stan
image: nats-streaming:latest
command: -store file -dir /data
environment:
GET_HOST_FROM: dns
networks:
- mononet
ports:
- '8222:8222'
volumes:
- 'standata:/data'
customer-web-service:
hostname: customer-web
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: customer-web
cmd: gateway
environment:
<<: *default-environment
SERVICE_ID: customer-web-service
networks:
- mononet
ports:
- '8000:80'
accounting-service:
hostname: accountingservice
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: accounting
environment:
<<: *default-environment
SERVICE_ID: accounting-service
PG_CONN: host=postgres dbname=accounting user=accounting_user password=accounting_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
accounting-cdc:
container_name: accountingcdc
hostname: accountingcdc
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: accounting
cmd: cdc
environment:
<<: *default-environment
SERVICE_ID: accounting-cdc
PG_CONN: host=postgres dbname=accounting user=accounting_user password=accounting_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
consumer-service:
hostname: consumerservice
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: consumer
environment:
<<: *default-environment
SERVICE_ID: consumer-service
PG_CONN: host=postgres dbname=consumer user=consumer_user password=consumer_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
consumer-cdc:
container_name: consumercdc
hostname: consumercdc
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: consumer
cmd: cdc
environment:
<<: *default-environment
SERVICE_ID: consumer-cdc
PG_CONN: host=postgres dbname=consumer user=consumer_user password=consumer_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
delivery-service:
hostname: deliveryservice
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: delivery
environment:
<<: *default-environment
SERVICE_ID: delivery-service
PG_CONN: host=postgres dbname=delivery user=delivery_user password=delivery_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
kitchen-service:
hostname: kitchenservice
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: kitchen
environment:
<<: *default-environment
SERVICE_ID: kitchen-service
PG_CONN: host=postgres dbname=kitchen user=kitchen_user password=kitchen_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
kitchen-cdc:
container_name: kitchencdc
hostname: kitchencdc
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: kitchen
cmd: cdc
environment:
<<: *default-environment
SERVICE_ID: kitchen-cdc
PG_CONN: host=postgres dbname=kitchen user=kitchen_user password=kitchen_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
order-service:
hostname: orderservice
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: order
environment:
<<: *default-environment
SERVICE_ID: order-service
PG_CONN: host=postgres dbname=ordering user=ordering_user password=ordering_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
order-history-service:
hostname: orderhistoryservice
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: order-history
environment:
<<: *default-environment
SERVICE_ID: order-history-service
PG_CONN: host=postgres dbname=order_history user=order_history_user password=order_history_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
order-cdc:
container_name: ordercdc
hostname: ordercdc
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: order
cmd: cdc
environment:
<<: *default-environment
SERVICE_ID: order-cdc
PG_CONN: host=postgres dbname=ordering user=ordering_user password=ordering_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
restaurant-service:
hostname: restaurantservice
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: restaurant
environment:
<<: *default-environment
SERVICE_ID: restaurant-service
PG_CONN: host=postgres dbname=restaurant user=restaurant_user password=restaurant_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
restaurant-cdc:
container_name: restaurantcdc
hostname: restaurantcdc
restart: on-failure
build:
context: ..
dockerfile: ftgogo/Dockerfile.development
args:
service: restaurant
cmd: cdc
environment:
<<: *default-environment
SERVICE_ID: restaurant-cdc
PG_CONN: host=postgres dbname=restaurant user=restaurant_user password=restaurant_pass pool_max_conns=10
depends_on:
- postgres
- stan
networks:
- mononet
networks:
mononet:
volumes:
pgdata:
standata: