-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
docker-compose.yml
399 lines (375 loc) · 9.46 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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
services:
mongodb:
image: mongo:7.0.14-jammy
restart: unless-stopped
command: mongod --bind_ip_all --replSet rs0
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongodb:27017',priority:1},{_id:1,host:'mongodb_secondary:27017',priority:0.5}]}) }" | mongosh --quiet
interval: 5s
timeout: 30s
start_period: 0s
retries: 30
networks:
- lila-network
volumes:
- ./repos/lila:/lila
- ./scripts:/scripts
mongodb_secondary:
image: mongo:7.0.14-jammy
restart: unless-stopped
command: mongod --bind_ip_all --replSet rs0
networks:
- lila-network
redis:
image: redis:7.2.5-alpine3.20
restart: unless-stopped
networks:
- lila-network
lila:
build:
context: docker
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
dockerfile: sbt.Dockerfile
user: ${USER_ID}:${GROUP_ID}
working_dir: /lila
entrypoint: ./lila run
restart: unless-stopped
networks:
- lila-network
environment:
- LILA_DOMAIN=${LILA_DOMAIN:-localhost:8080}
- LILA_URL=${LILA_URL:-http://localhost:8080}
- ENABLE_MONITORING=${ENABLE_MONITORING:-false}
- ENABLE_RATE_LIMITING=${ENABLE_RATE_LIMITING:-true}
volumes:
- ./repos/lila:/lila
- ./repos/chessground:/chessground
- ./repos/pgn-viewer:/pgn-viewer
- ./repos/bbpPairings:/opt/bbpPairings
- ./repos/scalachess:/scalachess
- ./conf/lila.conf:/lila/conf/application.conf
lila_ws:
build:
context: docker
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
dockerfile: sbt.Dockerfile
user: ${USER_ID}:${GROUP_ID}
working_dir: /lila-ws
entrypoint: sbt run -Dconfig.file=/lila-ws.conf
restart: unless-stopped
networks:
- lila-network
environment:
- LILA_URL=${LILA_URL:-http://localhost:8080}
- ENABLE_MONITORING=${ENABLE_MONITORING:-false}
volumes:
- ./repos/lila-ws:/lila-ws
- ./conf/lila-ws.conf:/lila-ws.conf
nginx:
image: nginx:1.27.0-alpine3.19-slim
restart: unless-stopped
networks:
- lila-network
ports:
- 8080:80
volumes:
- ./conf/nginx.conf:/etc/nginx/conf.d/default.conf
- ./repos/lila/public:/lila/public
- ./repos/lifat:/lifat
- ./nginx:/nginx
depends_on:
- lila
- lila_ws
api_docs:
build:
context: docker
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
dockerfile: ui.Dockerfile
working_dir: /api/doc
entrypoint: ["/bin/sh", "-c", "npm install && npm run serve -- --host=0.0.0.0"]
restart: unless-stopped
user: ${USER_ID}:${GROUP_ID}
ports:
- 8089:8089
volumes:
- ./repos/api:/api
profiles:
- api-docs
chessground:
build:
context: docker
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
dockerfile: ui.Dockerfile
entrypoint: ["/bin/sh", "-c", "pnpm install && pnpm run compile && pnpx http-server -p 8080"]
restart: unless-stopped
user: ${USER_ID}:${GROUP_ID}
ports:
- 8090:8080
volumes:
- ./repos/chessground:/app
- ./.pnpm-store:/.pnpm-store
profiles:
- chessground
pgn_viewer:
build:
context: docker
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
dockerfile: ui.Dockerfile
entrypoint: ["/bin/sh", "-c", "pnpm install && pnpm run demo"]
restart: unless-stopped
user: ${USER_ID}:${GROUP_ID}
ports:
- 8091:8080
volumes:
- ./repos/pgn-viewer:/app
- ./.pnpm-store:/.pnpm-store
profiles:
- pgn-viewer
lila_engine:
image: rust:1.80.0-slim-bookworm
working_dir: /lila-engine
entrypoint: cargo run -- --bind 0.0.0.0:9666 --mongodb mongodb://mongodb
restart: unless-stopped
user: ${USER_ID}:${GROUP_ID}
environment:
- LILA_ENGINE_LOG=lila_engine=debug,tower_http=debug
networks:
- lila-network
ports:
- 9666:9666
volumes:
- ./repos/lila-engine:/lila-engine
profiles:
- external-engine
lila_fishnet:
build:
context: docker
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
dockerfile: sbt.Dockerfile
user: ${USER_ID}:${GROUP_ID}
working_dir: /lila-fishnet
entrypoint: sbt app/run
environment:
- APP_BACKUP_FILE=/backup.json
- CONFIG_FORCE_kamon_influxdb_authentication_token=secret
- CONFIG_FORCE_kamon_influxdb_hostname=influxdb
- KAMON_ENABLED=${ENABLE_MONITORING:-false}
- REDIS_HOST=redis
# - HTTP_API_LOGGER=true
restart: unless-stopped
networks:
- lila-network
volumes:
- ./repos/lila-fishnet:/lila-fishnet
profiles:
- stockfish-play
fishnet_play:
image: niklasf/fishnet:2.9.3
restart: unless-stopped
environment:
- ENDPOINT=http://lila_fishnet:9665/fishnet
- MAX_BACKOFF=5
- STATS_FILE=/stats.json
networks:
- lila-network
profiles:
- stockfish-play
fishnet_analysis:
image: niklasf/fishnet:2.9.3
restart: unless-stopped
environment:
- ENDPOINT=http://lila:9663/fishnet
- MAX_BACKOFF=5
- STATS_FILE=/stats.json
networks:
- lila-network
profiles:
- stockfish-analysis
python:
build:
context: docker
dockerfile: python.Dockerfile
networks:
- lila-network
volumes:
- ./repos/berserk:/berserk
- ./repos/lila-db-seed:/lila-db-seed
- ./scripts:/scripts
profiles:
- utils
ui:
build:
context: docker
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
dockerfile: ui.Dockerfile
restart: unless-stopped
user: ${USER_ID}:${GROUP_ID}
networks:
- lila-network
volumes:
- ./repos/lila:/lila
- ./repos/chessground:/chessground
- ./repos/pgn-viewer:/pgn-viewer
- ./.pnpm-store:/.pnpm-store
profiles:
- utils
elasticsearch:
image: elasticsearch:7.17.4
restart: unless-stopped
environment:
- discovery.type=single-node
- http.cors.allow-origin=/.*/
- http.cors.enabled=true
- xpack.security.enabled=false
networks:
- lila-network
ports:
- 9200:9200
profiles:
- search
elasticvue:
image: cars10/elasticvue:1.0.10
restart: unless-stopped
volumes:
- ./conf/elasticvue.json:/usr/share/nginx/html/api/default_clusters.json
ports:
- 8092:8080
networks:
- lila-network
profiles:
- search
lila_search:
build:
context: docker
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
dockerfile: sbt.Dockerfile
user: ${USER_ID}:${GROUP_ID}
working_dir: /lila-search
entrypoint: sbt app/run
restart: unless-stopped
environment:
- ELASTIC_URI=http://elasticsearch:9200
- HTTP_API_LOGGER=true
- HTTP_ENABLE_DOCS=true
ports:
- 9673:9673
networks:
- lila-network
volumes:
- ./repos/lila-search:/lila-search
profiles:
- search
lila_search_ingestor:
build:
context: docker
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
dockerfile: sbt.Dockerfile
user: ${USER_ID}:${GROUP_ID}
working_dir: /lila-search
entrypoint: sbt 'ingestor/runMain lila.search.ingestor.App'
restart: unless-stopped
environment:
- APP_LOG_LEVEL=DEBUG
- ELASTIC_URI=http://elasticsearch:9200
- ELASTIC4S_LOG_LEVEL=DEBUG
- MONGO_DATABASE=lichess
- MONGO_STUDY_DATABASE=lichess
- MONGO_DRIVER_LOG_LEVEL=DEBUG
- MONGO_URI=mongodb://mongodb_secondary
- MONGO_STUDY_URI=mongodb://mongodb_secondary
- INGESTOR_FORUM_TIME_WINDOWS=1
- INGESTOR_STUDY_INTERVAL=10
- INGESTOR_STUDY_START_AT=1344789787
networks:
- lila-network
volumes:
- ./repos/lila-search:/lila-search
profiles:
- search
lila_gif:
image: rust:1.80.0-slim-bookworm
working_dir: /lila-gif
entrypoint: cargo run -- --bind 0.0.0.0:6175
restart: unless-stopped
user: ${USER_ID}:${GROUP_ID}
ports:
- 6175:6175
networks:
- lila-network
volumes:
- ./repos/lila-gif:/lila-gif
profiles:
- gifs
picfit:
build:
context: docker
dockerfile: picfit.Dockerfile
ports:
- 3001:3001
networks:
- lila-network
volumes:
- ./conf/picfit.json:/mnt/config.json
- ./docker/assets:/uploads
profiles:
- thumbnails
mailpit:
image: axllent/mailpit:v1.20.0
restart: unless-stopped
ports:
- 8025:8025
networks:
- lila-network
profiles:
- email
mongo_express_primary:
image: mongo-express:1.0.2-20-alpine3.19
restart: unless-stopped
ports:
- 8081:8081
environment:
- ME_CONFIG_BASICAUTH=false
- ME_CONFIG_MONGODB_SERVER=mongodb
networks:
- lila-network
depends_on:
- mongodb
profiles:
- mongo-express
influxdb:
image: influxdb:2.7.8-alpine
restart: unless-stopped
ports:
- 8086:8086
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=admin
- DOCKER_INFLUXDB_INIT_PASSWORD=password
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=secret
- DOCKER_INFLUXDB_INIT_ORG=lila-docker
- DOCKER_INFLUXDB_INIT_BUCKET=kamon
networks:
- lila-network
profiles:
- monitoring
networks:
lila-network:
driver: bridge