-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
263 lines (262 loc) · 7.13 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
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
version: "3.7"
services:
pgdb:
image: postgres
restart: always
container_name: pgdb
env_file: ./postgres/docker-compose.env
volumes:
- ./postgres/postgresDB:/var/lib/postgresql/data
- ./postgres/postgresInit:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
promotionsrv:
build:
context: .
dockerfile: ./promotion/Dockerfile
target: dev
depends_on:
- pgdb
- nats
- usersrv
- customersrv
- redis
container_name: promotionsrvcont
entrypoint: CompileDaemon --build="go build -o promotionServer ./promotion/server/" --command=./promotionServer
env_file: ./promotion/docker-compose.env
volumes:
- ./promotion/server:/go/src/goTemp/promotion/server
- ./globalUtils:/go/src/goTemp/globalUtils
ports:
- "50051:50051"
- "2114:2112"
promotioncli:
build:
context: .
dockerfile: ./promotion/DockerfileCli
target: dev
depends_on:
- usersrv
container_name: promotionclicont
env_file: ./promotion/docker-compose-cli.env
entrypoint: CompileDaemon --build="go build -o promotionClient ./promotion/client/" --command=./promotionClient
volumes:
- ./promotion/client:/go/src/goTemp/promotion/client
ports:
- "50052:50051"
usersrv:
build:
context: .
dockerfile: ./user/Dockerfile
target: dev
depends_on:
- pgdb
- nats
container_name: usersrvcont
entrypoint: CompileDaemon --build="go build -o userServer ./user/server/" --command=./userServer
env_file: ./user/docker-compose.env
volumes:
- ./user/server:/go/src/goTemp/user/server
- ./globalUtils:/go/src/goTemp/globalUtils
- ./globalMonitoring:/go/src/goTemp/globalMonitoring
ports:
- "50053:50053"
- "2111:2112"
usercli:
build:
context: .
dockerfile: ./user/DockerfileCli
target: dev
container_name: userclicont
env_file: ./user/docker-compose-cli.env
entrypoint: CompileDaemon --build="go build -o userClient ./user/client/" --command=./userClient
volumes:
- ./user/client:/go/src/goTemp/user/client
ports:
- "50054:50051"
auditsrv:
build:
context: .
dockerfile: ./audit/Dockerfile
target: dev
depends_on:
- timescaledb
- nats
container_name: auditsrvcont
entrypoint: CompileDaemon --build="go build -o auditServer ./audit/server/" --command=./auditServer
env_file: ./audit/docker-compose.env
volumes:
- ./audit/server:/go/src/goTemp/audit/server
- ./globalUtils:/go/src/goTemp/globalUtils
ports:
- "50055:50055"
- "2115:2112"
customersrv:
build:
context: .
dockerfile: ./customer/Dockerfile
target: dev
depends_on:
- arangodb
- nats
- usersrv
container_name: customersrvcont
entrypoint: CompileDaemon --build="go build -o customerServer ./customer/server/" --command=./customerServer
env_file: ./customer/docker-compose.env
volumes:
- ./customer/server:/go/src/goTemp/customer/server
- ./globalUtils:/go/src/goTemp/globalUtils
ports:
- "50057:50057"
- "2112:2112"
customercli:
build:
context: .
dockerfile: ./customer/DockerfileCli
target: dev
container_name: customerclicont
env_file: ./customer/docker-compose-cli.env
entrypoint: CompileDaemon --build="go build -o customerClient ./customer/client/" --command=./customerClient
volumes:
- ./customer/client:/go/src/goTemp/customer/client
ports:
- "50058:50051"
productsrv:
build:
context: .
dockerfile: ./product/Dockerfile
target: dev
depends_on:
- arangodb
- nats
- usersrv
container_name: productsrvcont
entrypoint: CompileDaemon --build="go build -o productServer ./product/server/" --command=./productServer
env_file: ./product/docker-compose.env
volumes:
- ./product/server:/go/src/goTemp/product/server
- ./globalUtils:/go/src/goTemp/globalUtils
ports:
- "50059:50059"
- "2113:2112"
productcli:
build:
context: .
dockerfile: ./product/DockerfileCli
target: dev
container_name: productclicont
env_file: ./product/docker-compose-cli.env
entrypoint: CompileDaemon --build="go build -o productClient ./product/client/" --command=./productClient
volumes:
- ./product/client:/go/src/goTemp/product/client
ports:
- "50060:50051"
nats:
build:
context: ./nats
dockerfile: Dockerfile
ports:
- "8222:8222"
- "4222:4222"
- "6222:6222"
timescaledb:
build:
context: ./timescaledb
dockerfile: Dockerfile
restart: always
container_name: timescaledb
env_file: ./timescaledb/docker-compose.env
volumes:
- ./timescaledb/timescaleDB:/var/lib/postgresql/data
ports:
- "5433:5432"
arangodb:
image: arangodb:3.6.4
container_name: arangodbcont
env_file: ./arangodb/docker-compose.env
ports:
- "8529:8529"
volumes:
- ./arangodb/db:/var/lib/arangodb3
- ./arangodb/apps_db_system:/var/lib/arangodb3-apps/_db/
- ./arangodb/arangodbinit:/docker-entrypoint-initdb.d
redis:
image: redis
container_name: rediscont
env_file: ./redis/docker-compose.env
volumes:
- ./redis/data:/data
- ./redis/config:/usr/local/etc/redis/
# command: ["redis-server","/usr/local/etc/redis/redis.conf", "--appendonly", "yes"]
entrypoint: ["sh", "-c", "redis-server --appendonly yes --requirepass $${REDIS_PASS}"]
ports:
- "6379:6379"
microapi:
image: micro/micro:v2.9.3
container_name: microcont
command: api --handler=rpc --namespace=goTemp.api
ports:
- "8080:8080"
web:
build:
context: ./web
dockerfile: Dockerfile
target: dev
depends_on:
- microapi
container_name: gtweb
env_file: ./web/docker-compose.env
volumes:
- ./web/sapper/src:/goTemp/web/sapper/src
ports:
- "3000:3000"
- "10000:10000"
prometheus:
image: prom/prometheus
depends_on:
- pgdbexporter
- redisexporter
- natsexporter
- timescaleexporter
ports:
- "9090:9090"
volumes:
- ./prometheus:/etc/prometheus
grafana:
image: grafana/grafana
depends_on:
- prometheus
env_file: ./grafana/docker-compose.env
ports:
- "3001:3000"
volumes:
- ./grafana/data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
pgdbexporter:
image: bitnami/postgres-exporter
depends_on:
- pgdb
env_file: ./prometheus/postgresExporter/docker-compose.env
ports:
- "9187:9187"
redisexporter:
image: bitnami/redis-exporter
depends_on:
- redis
env_file: ./prometheus/redisExporter/docker-compose.env
ports:
- "9121:9121"
natsexporter:
image: natsio/prometheus-nats-exporter
depends_on:
- nats
ports:
- "7777:7777"
command: ["-varz", "http://nats:8222"]
timescaleexporter:
image: bitnami/postgres-exporter
depends_on:
- timescaledb
env_file: ./prometheus/timescaledbExporter/docker-compose.env
ports:
- "9188:9187"