-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yaml
222 lines (222 loc) · 5.18 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
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
version: '3'
services:
mongodb:
build:
context: mongo
image: $DOCKERHUB_USER/rs-mongodb:$TAG
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
mysql:
build:
context: mysql
image: $DOCKERHUB_USER/rs-mysql:$TAG
cap_add:
- NET_ADMIN
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
rabbitmq:
image: rabbitmq:3.7-management-alpine
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
redis:
image: redis:4.0.6
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
catalogue:
build:
context: catalogue
image: $DOCKERHUB_USER/rs-catalogue:$TAG
depends_on:
- mongodb
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
- MONGO_HOST=mongodb
- NEW_RELIC_APP_NAME=catalogue-service
- NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY
- NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
- NEW_RELIC_LABELS=clusterName:$CLUSTER_NAME;service:catalogue
cart:
build:
context: cart
image: $DOCKERHUB_USER/rs-cart:$TAG
depends_on:
- redis
- catalogue
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
- REDIS_HOST=redis
- CATALOGUE_HOST=catalogue
- NEW_RELIC_APP_NAME=cart-service
- NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY
- NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
- NEW_RELIC_LABELS=clusterName:$CLUSTER_NAME;service:cart
user:
build:
context: user
image: $DOCKERHUB_USER/rs-user:$TAG
depends_on:
- mongodb
- redis
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
- MONGO_HOST=mongodb
- REDIS_HOST=redis
- NEW_RELIC_APP_NAME=user-service
- NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY
- NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
- NEW_RELIC_LABELS=clusterName:$CLUSTER_NAME;service:user
shipping:
build:
context: shipping
image: $DOCKERHUB_USER/rs-shipping:$TAG
depends_on:
- mysql
- cart
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
- MYSQL_HOST=mysql
- CART_HOST=cart
- NEW_RELIC_APP_NAME=shipping-service
- NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY
- NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
- NEW_RELIC_LABELS=clusterName:$CLUSTER_NAME;service:shipping
ratings:
build:
context: ratings
image: $DOCKERHUB_USER/rs-ratings:$TAG
networks:
- geek-shop
depends_on:
- mysql
- catalogue
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
- MYSQL_HOST=mysql
- CATALOGUE_HOST=catalogue
- NEW_RELIC_APP_NAME=ratings-service
- NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY
- NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
- NEW_RELIC_LABELS=clusterName:$CLUSTER_NAME;service:ratings
payment:
build:
context: payment
image: $DOCKERHUB_USER/rs-payment:$TAG
depends_on:
- rabbitmq
- cart
- user
networks:
- geek-shop
environment:
- AMQP_HOST=rabbitmq
- CART_HOST=cart
- USER_HOST=user
- NEW_RELIC_APP_NAME=payment-service
- NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY
- NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
- NEW_RELIC_LABELS=clusterName:$CLUSTER_NAME;service:payment
deploy:
replicas: 1
restart_policy:
condition: on-failure
dispatch:
build:
context: dispatch
image: $DOCKERHUB_USER/rs-dispatch:$TAG
depends_on:
- rabbitmq
networks:
- geek-shop
environment:
- AMQP_HOST=rabbitmq
- NEW_RELIC_APP_NAME=dispatch-service
- NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY
deploy:
replicas: 1
restart_policy:
condition: on-failure
web:
build:
context: web
image: $DOCKERHUB_USER/rs-web:$TAG
depends_on:
- catalogue
- cart
- user
- shipping
- ratings
- payment
ports:
- "8888:8080"
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
- CATALOGUE_HOST=catalogue
- CART_HOST=cart
- USER_HOST=user
- SHIPPING_HOST=shipping
- RATINGS_HOST=ratings
- PAYMENT_HOST=payment
- NEW_RELIC_BROWSER_LICENSE_KEY=$NEW_RELIC_BROWSER_LICENSE_KEY
- NEW_RELIC_BROWSER_APPLICATION_ID=$NEW_RELIC_BROWSER_APPLICATION_ID
loader:
build:
context: loader
image: $DOCKERHUB_USER/rs-loader:$TAG
depends_on:
- web
networks:
- geek-shop
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
- HOST=$PUBLIC_URL
- CLIENTS=1
- ERROR=0
networks:
geek-shop: