-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
214 lines (199 loc) · 5.21 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
version: "3.8"
services:
# Database
db:
container_name: db
image: postgres:latest
restart: always
environment:
- POSTGRES_DB=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_ENCODING=UTF8
healthcheck:
test: pg_isready -U postgres
interval: 5s
timeout: 10s
retries: 3
# Test Suite
tests:
container_name: acmerun-tests
image: samkithkjain/acmerun-tests
restart: no
environment:
- MODE=prod
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_ENCODING=UTF8
- POSTGRES_LOG_LEVEL=silent
depends_on:
db:
condition: service_healthy
# RabbitMQ
rabbitmq:
container_name: rabbitmq
image: rabbitmq:management
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 5s
timeout: 5s
retries: 3
depends_on:
tests:
condition: service_completed_successfully
# User Manager
user:
container_name: acmerun-user
image: samkithkjain/acmerun-user
restart: always
ports:
- "8010:8010"
environment:
- MODE=prod
- PORT=8010
- GIN_MODE=release
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_ENCODING=UTF8
- POSTGRES_LOG_LEVEL=silent
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
tests:
condition: service_completed_successfully
# Zone Manager
zone:
container_name: acmerun-zone
image: samkithkjain/acmerun-zone
restart: always
ports:
- "8011:8011"
environment:
- MODE=prod
- PORT=8011
- GIN_MODE=release
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_ENCODING=UTF8
- POSTGRES_LOG_LEVEL=silent
- RABBITMQ_HOSTNAME=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- RABBIT_LOCATION_CONSUMER=location_peripheral_zone_queue
- RABBITMQ_SHELTER_DISTANCE_PUBLISHER=shelter_zone_workout_queue
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
tests:
condition: service_completed_successfully
# Peripheral Service
peripheral:
container_name: acmerun-peripheral
image: samkithkjain/acmerun-peripheral
restart: always
ports:
- "8012:8012"
environment:
- MODE=prod
- PORT=8012
- GIN_MODE=release
- RABBITMQ_HOSTNAME=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- RABBIT_WORKOUT_LOCATION_PUBLISHER=location_peripheral_workout_queue
- RABBITMQ_ZONE_LOCATION_PUBLISHER=location_peripheral_zone_queue
- ZONE_CLIENT_URL=http://zone:8011
depends_on:
rabbitmq:
condition: service_healthy
zone:
condition: service_started
tests:
condition: service_completed_successfully
# Workout Manager
workout:
container_name: acmerun-workout
image: samkithkjain/acmerun-workout
restart: always
ports:
- "8013:8013"
environment:
- MODE=prod
- PORT=8013
- GIN_MODE=release
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_ENCODING=UTF8
- POSTGRES_LOG_LEVEL=silent
- RABBITMQ_HOSTNAME=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- RABBITMQ_SHELTER_DISTANCE_CONSUMER=shelter_zone_workout_queue
- RABBITMQ_LOCATION_CONSUMER=location_peripheral_workout_queue
- RABBITMQ_WORKOUT_STATS_PUBLISHER=stats_workout_challenge_queue
- USER_CLIENT_URL=http://user:8010
- PERIPHERAL_CLIENT_URL=http://peripheral:8012
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
peripheral:
condition: service_started
user:
condition: service_started
tests:
condition: service_completed_successfully
# Challenge Manager
challenge:
container_name: acmerun-challenge
image: samkithkjain/acmerun-challenge
restart: always
ports:
- "8014:8014"
environment:
- MODE=prod
- PORT=8014
- GIN_MODE=release
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_ENCODING=UTF8
- POSTGRES_LOG_LEVEL=silent
- RABBITMQ_HOSTNAME=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- RABBITMQ_WORKOUT_STATS_CONSUMER=stats_workout_challenge_queue
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
tests:
condition: service_completed_successfully