-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (61 loc) · 2.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (61 loc) · 2.34 KB
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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: omni_arena
POSTGRES_USER: omni_arena
POSTGRES_PASSWORD: omni_arena
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U omni_arena -d omni_arena"]
interval: 2s
timeout: 3s
retries: 15
volumes:
- omni_arena_postgres:/var/lib/postgresql/data
# Single-tenant app: Fastify API + the built web UI in one container. On start
# it runs migrations, seeds the lineup, then serves both on one port. Provider
# keys and secrets come from .env; DATABASE_URL is overridden to reach the
# postgres service by its compose hostname (the .env value targets localhost
# for the npm dev path).
app:
build: .
depends_on:
postgres:
condition: service_healthy
env_file: .env
environment:
DATABASE_URL: postgres://omni_arena:omni_arena@postgres:5432/omni_arena
ports:
- "${PORT:-3001}:${PORT:-3001}"
restart: unless-stopped
# Bradley-Terry rating worker. Reads aggregated votes, fits ratings with
# Fisher-information CIs, and upserts model_ratings on a periodic loop —
# warm-started refits, with a from-scratch pass every FULL_REFIT_EVERY refits.
# Each iteration also runs the style-controlled pass (the image's default
# command is `--loop --style`), which is what fills model_style_ratings and
# style_control_coefficients for the dashboard's style panels.
# Requires the server's migrations to have created model_ratings; until then
# it logs and retries on the next interval.
#
# Every knob the worker reads is forwarded explicitly rather than via
# `env_file`: it needs no provider keys or app secrets, and the defaults below
# match the worker's own. Values come from the repo-root .env like the rest of
# the interpolation in this file.
worker:
build: ./worker
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://omni_arena:omni_arena@postgres:5432/omni_arena
REFIT_INTERVAL_SECONDS: ${REFIT_INTERVAL_SECONDS:-300}
FULL_REFIT_EVERY: ${FULL_REFIT_EVERY:-12}
RATING_RIDGE: ${RATING_RIDGE:-0.01}
STYLE_RIDGE: ${STYLE_RIDGE:-0.05}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
LOG_FORMAT: ${LOG_FORMAT:-text}
restart: unless-stopped
volumes:
omni_arena_postgres: