-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
239 lines (226 loc) · 5.78 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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
name: gilgoblin
services:
gilgoblin-database:
image: nickreinlein/gilgoblin-database
container_name: database
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGUSER: ${PGUSER}
PGDATA: ${PGDATA}
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- gilgoblin
ports:
- "5432:${PORT_DATABASE}"
logging:
driver: 'json-file'
options:
max-size: '50m'
volumes:
- ./src/Database/db:/var/lib/postgresql/data
- ./src/Database/scripts:/docker-entrypoint-initdb.d
restart: unless-stopped
gilgoblin-api:
image: nickreinlein/gilgoblin-api
container_name: api
depends_on:
- gilgoblin-database
environment:
ConnectionStrings__GilGoblinDbContext: ${DB_CONNECTION_STRING}
healthcheck:
test: [ "CMD-SHELL" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- gilgoblin
ports:
- "${PORT_API}:8080"
logging:
driver: 'json-file'
options:
max-size: '50m'
restart: unless-stopped
gilgoblin-dataupdater:
image: nickreinlein/gilgoblin-dataupdater
container_name: dataupdater
depends_on:
- gilgoblin-database
- gilgoblin-api
environment:
ConnectionStrings__GilGoblinDbContext: ${DB_CONNECTION_STRING}
healthcheck:
test: [ "CMD-SHELL" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- gilgoblin
logging:
driver: 'json-file'
options:
max-size: '50m'
restart: unless-stopped
gilgoblin-accountant:
image: nickreinlein/gilgoblin-accountant
container_name: accountant
depends_on:
- gilgoblin-database
- gilgoblin-api
environment:
ConnectionStrings__GilGoblinDbContext: ${DB_CONNECTION_STRING}
healthcheck:
test: [ "CMD-SHELL" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- gilgoblin
logging:
driver: 'json-file'
options:
max-size: '50m'
restart: unless-stopped
gilgoblin-frontend:
image: nickreinlein/gilgoblin-frontend
container_name: frontend
## For local testing, replace with:
# image: frontend
# build: src/frontend/
depends_on:
- gilgoblin-database
- gilgoblin-api
healthcheck:
test: [ "CMD-SHELL" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- gilgoblin
ports:
- "3000:${PORT_FRONTEND}"
logging:
driver: 'json-file'
options:
max-size: '50m'
restart: unless-stopped
### Alerts & Monitoring ###
gilgoblin-influxdb:
image: influxdb:1.8.10
container_name: influxdb
logging:
driver: 'json-file'
options:
max-size: '50m'
environment:
- DOCKER_INFLUXDB_INIT_MODE=${DOCKER_INFLUXDB_INIT_MODE}
- DOCKER_INFLUXDB_INIT_ORG=${DOCKER_INFLUXDB_INIT_ORG}
- DOCKER_INFLUXDB_INIT_BUCKET=${DOCKER_INFLUXDB_INIT_BUCKET}
- DOCKER_INFLUXDB_DB=${DOCKER_INFLUXDB_DB}
- DOCKER_INFLUXDB_ADMIN_USER=${DOCKER_INFLUXDB_ADMIN_USER}
- DOCKER_INFLUXDB_ADMIN_PASSWORD=${DOCKER_INFLUXDB_ADMIN_PASSWORD}
networks:
- gilgoblin
ports:
- '8086:8086'
volumes:
- ./benchmarks/influxdb:/var/lib/influxdb
gilgoblin-prometheus:
image: prom/prometheus
container_name: prometheus
command:
- --web.enable-remote-write-receiver
- --enable-feature=native-histograms
- --config.file=/etc/prometheus/prometheus.yml
healthcheck:
test: [ "CMD-SHELL" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- gilgoblin
ports:
- "9090:9090"
depends_on:
- gilgoblin-influxdb
logging:
driver: 'json-file'
options:
max-size: '50m'
volumes:
- ./benchmarks/prometheus:/etc/prometheus
restart: unless-stopped
gilgoblin-node-exporter:
image: prom/node-exporter
container_name: node-exporter
healthcheck:
test: [ "CMD-SHELL" ]
interval: 10s
timeout: 5s
retries: 5
logging:
driver: 'json-file'
options:
max-size: '50m'
depends_on:
- gilgoblin-prometheus
networks:
- gilgoblin
ports:
- "9100:9100"
volumes:
- ./benchmarks:/etc/node-exporter
restart: unless-stopped
gilgoblin-grafana:
image: grafana/grafana
container_name: grafana
healthcheck:
test: [ "CMD-SHELL" ]
interval: 10s
timeout: 5s
retries: 5
logging:
driver: 'json-file'
options:
max-size: '50m'
networks:
- gilgoblin
environment:
- GF_AUTH_ANONYMOUS_ORG_ROLE=${GF_AUTH_ANONYMOUS_ORG_ROLE}
- GF_AUTH_ANONYMOUS_ENABLED=${GF_AUTH_ANONYMOUS_ENABLED}
- GF_AUTH_BASIC_ENABLED=${GF_AUTH_BASIC_ENABLED}
ports:
- "${PORT_GRAFANA}:3000"
volumes:
- ./benchmarks/grafana:/var/lib/grafana
restart: unless-stopped
### Benchmarks ###
# gilgoblin-k6-benchmarks:
# image: grafana/k6
# container_name: k6-benchmarks
# depends_on:
# - gilgoblin-database
# - gilgoblin-api
# - gilgoblin-prometheus
# - gilgoblin-influxdb
# - gilgoblin-grafana
# environment:
# - K6_PROMETHEUS_RW_SERVER_URL=http://host.docker.internal:9090/api/v1/write
# - K6_PROMETHEUS_RW_TREND_STATS=p(95),p(99),min,max
# - K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true
# command: run -o experimental-prometheus-rw /scripts/crafts-benchmark.js --out influxdb=http://host.docker.internal:8086/gilgoblin_db
# networks:
# - gilgoblin
# ports:
# - "6565:6565"
# volumes:
# - ./benchmarks:/scripts
# restart: no
networks:
gilgoblin: