-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
286 lines (280 loc) · 7.97 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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
services:
backend:
build:
context: .
dockerfile: ./backend/Spectator/Dockerfile
hostname: backend
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:80
- ASPNETCORE_InfluxDbOptions__Url=http://influx:8086
- ASPNETCORE_InfluxDbOptions__Token=${INFLUXDB_TOKEN}
- ASPNETCORE_InfluxDbOptions__SessionEventsBucket=session_events
- ASPNETCORE_InfluxDbOptions__InputEventsBucket=input_events
- ASPNETCORE_InfluxDbOptions__Org=${INFLUXDB_ORG}
- ASPNETCORE_LoggerOptions__AccessToken=${LOGGER_TOKEN}
- ASPNETCORE_LoggerOptions__Address=http://logger:3000
- ASPNETCORE_JwtAuthentication__Secret=q6r+MfCs2qAjFe6z2vfrIXtDrTc7uNwPzZwE1RNFFM2IQ6n84zOMUFbwmPtguZwAP5kgCZ803iJgmXkbRzGCbQ==
- ASPNETCORE_JwtAuthentication__Issuer=https://teknologiumum.com
- ASPNETCORE_JwtAuthentication__Audience=https://teknologiumum.com
- ASPNETCORE_JwtAuthentication__Lifetime=31536000
- ASPNETCORE_MinioOptions__Url=minio:9000
- ASPNETCORE_MinioOptions__AccessKey=${MINIO_ACCESS_KEY}
- ASPNETCORE_MinioOptions__SecretKey=${MINIO_SECRET_KEY}
- ASPNETCORE_PistonOptions__Address=http://rce:50051
- ASPNETCORE_PistonOptions__MaxConcurrentExecution=100
- ASPNETCORE_PistonOptions__CompileTimeout=5000
- ASPNETCORE_PistonOptions__RunTimeout=10000
- ASPNETCORE_PistonOptions__MemoryLimit=2000000000
- ASPNETCORE_WorkerOptions__Address=http://worker:3000
- ASPNETCORE_VideoOptions__Address=http://video:3000
- VITE_SESSION_HUB_URL=${VITE_SESSION_HUB_URL}
- VITE_EVENT_HUB_URL=${VITE_EVENT_HUB_URL}
- VITE_LOGGER_URL=${VITE_LOGGER_URL}
- VITE_VIDEO_STREAM_URL=${VITE_VIDEO_STREAM_URL}
- VITE_ADMIN_URL=${VITE_ADMIN_URL}
- VITE_MINIO_URL=${VITE_MINIO_URL}
ports:
- 127.0.0.1:5000:80
healthcheck:
test: curl -f http://localhost:80/ || exit 1
interval: 15s
timeout: 10s
retries: 10
start_period: 60s
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
logging:
driver: json-file
options:
max-size: 100M
max-file: 3
depends_on:
worker:
condition: service_started
logger:
condition: service_started
influx:
condition: service_healthy
minio:
condition: service_healthy
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 15s
max_attempts: 10
window: 60s
minio:
image: quay.io/minio/minio:RELEASE.2022-02-05T04-40-59Z
command: server /data --console-address ":9001"
ports:
- 127.0.0.1:9000:9000
- 127.0.0.1:9001:9001
hostname: minio
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
healthcheck:
test: "curl -f http://localhost:9000/minio/health/live"
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
volumes:
- ./data/minio:/data
logging:
driver: json-file
options:
max-size: 100M
max-file: 3
deploy:
restart_policy:
condition: on-failure
delay: 15s
max_attempts: 10
window: 60s
influx:
image: influxdb:2.3.0-alpine
hostname: influx
ports:
- 127.0.0.1:8086:8086
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: ${INFLUXDB_USERNAME}
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD}
DOCKER_INFLUXDB_INIT_ORG: ${INFLUXDB_ORG}
DOCKER_INFLUXDB_INIT_BUCKET: ${INFLUXDB_BUCKET}
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_TOKEN}
healthcheck:
test: "influx ping"
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
volumes:
- ./data/influx/data2:/var/lib/influxdb2
- ./data/influx/data1:/var/lib/influxdb
- ./data/influx/etc:/etc/influxdb2
logging:
driver: json-file
options:
max-size: 100M
max-file: 3
deploy:
restart_policy:
condition: on-failure
delay: 15s
max_attempts: 10
window: 60s
rce:
build:
context: .
dockerfile: ./rce/Dockerfile
hostname: rce
healthcheck:
test: grpcurl -d '{}' -import-path . -proto rce.proto -plaintext localhost:50051 rce.CodeExecutionEngineService.Ping
interval: 15s
timeout: 10s
retries: 10
start_period: 60s
environment:
ENVIRONMENT: production
PORT: 50051
LOGGER_TOKEN: ${LOGGER_TOKEN}
LOGGER_SERVER_ADDRESS: logger:3000
logging:
driver: json-file
options:
max-size: 100M
max-file: 3
depends_on:
logger:
condition: service_started
deploy:
replicas: 2
restart_policy:
condition: on-failure
delay: 15s
max_attempts: 10
window: 60s
worker:
build:
context: .
dockerfile: ./worker/Dockerfile
hostname: worker
healthcheck:
test: grpcurl -d '{}' -import-path . -proto worker.proto -plaintext localhost:3000 worker_proto.Worker.Ping
interval: 15s
timeout: 10s
retries: 10
start_period: 60s
environment:
ENVIRONMENT: production
PORT: 3000
INFLUX_TOKEN: ${INFLUXDB_TOKEN}
INFLUX_HOST: http://influx:8086
INFLUX_ORG: ${INFLUXDB_ORG}
MINIO_HOST: minio:9000
MINIO_ACCESS_ID: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_TOKEN: ''
LOGGER_SERVER_ADDRESS: logger:3000
LOGGER_TOKEN: ${LOGGER_TOKEN}
logging:
driver: json-file
options:
max-size: 100M
max-file: 3
depends_on:
logger:
condition: service_started
influx:
condition: service_healthy
minio:
condition: service_healthy
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 15s
max_attempts: 10
window: 60s
video:
build:
context: .
dockerfile: ./video/Dockerfile
hostname: video
healthcheck:
test: grpcurl -d '{}' -import-path . -proto video.proto -plaintext localhost:3000 video.VideoService.Ping
interval: 15s
timeout: 10s
retries: 10
start_period: 60s
environment:
ENVIRONMENT: production
PORT: 3000
INFLUX_TOKEN: ${INFLUXDB_TOKEN}
INFLUX_HOST: http://influx:8086
INFLUX_ORG: ${INFLUXDB_ORG}
MINIO_HOST: minio:9000
MINIO_ACCESS_ID: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_TOKEN: ''
LOGGER_SERVER_ADDRESS: logger:3000
LOGGER_TOKEN: ${LOGGER_TOKEN}
logging:
driver: json-file
options:
max-size: 100M
max-file: 3
depends_on:
logger:
condition: service_started
influx:
condition: service_healthy
minio:
condition: service_healthy
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 15s
max_attempts: 10
window: 60s
logger:
build:
context: .
dockerfile: ./logger/Dockerfile
hostname: logger
healthcheck:
test: grpcurl -d '{}' -import-path . -proto logger.proto -plaintext localhost:3000 logger.Logger.Ping
interval: 15s
timeout: 10s
retries: 10
start_period: 60s
environment:
ENVIRONMENT: production
PORT: 3000
INFLUX_TOKEN: ${INFLUXDB_TOKEN}
INFLUX_URL: http://influx:8086
INFLUX_ORG: ${INFLUXDB_ORG}
ACCESS_TOKEN: ${LOGGER_TOKEN}
logging:
driver: json-file
options:
max-size: 100M
max-file: 3
depends_on:
influx:
condition: service_healthy
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 15s
max_attempts: 10
window: 60s