IW4M kept hitting a network wall (container -> host LAN IP -> IW4M loopback bind) that we couldn't cleanly punch through, and the two-minute !rt token added enough operational friction that the pause-all-deployments gate never got a fair test. RCON gives us the same fact — how many players are on a server right now — direct from each game server over UDP, with no session, no token, no proxy. - Add integrations/rcon.ts: dgram UDP client. rconGetPlayerCount() and rconGetStatus() parse both `status` (print + scoreboard) and `statusResponse` (info line + rows) dialects. Timeout via RCON_TIMEOUT_MS. - Add komodoResolveGamePort() + extractUdpPort(). Reads Komodo's read API for a server, walks both docker-compose-style port objects and docker-run-style "host:container/udp" strings, caches into servers.game_port on first success. - Replace pipelineReady() guard in sweep with a simple integrations-configured check. Same held/failed/manual outcomes, but keyed on RCON+Komodo instead of IW4M+auth-state. - Worker's status refresh fans out per-server over RCON at concurrency=4 so a 15-server fleet doesn't spike UDP. - Schema: drop iw4m_match/iw4m_value, add game_port + rcon_host. - Delete every auth artifact: TokenModal, auth store, auth-state module, /api/auth/token, /api/events/auth, iw4m.test.ts. Layout no longer mounts the modal, pipeline store no longer tracks a frozen state. - README + .env.example + docker-compose.yml + komodo/stack.toml swap IW4M_* env for RCON_PASSWORD / RCON_HOST / RCON_TIMEOUT_MS. Same host.docker.internal:host-gateway extra_hosts entry, repurposed for RCON reach. - Tests: add rcon.test.ts and komodo.test.ts, update sweep.test.ts to drop the auth-freeze case. 23/23 passing.
40 lines
1.3 KiB
TOML
40 lines
1.3 KiB
TOML
# Komodo stack definition. Deploys electric-cherry as a managed container on
|
|
# the same host running the T5 Plutonium servers. Mounts /root/zombies so the
|
|
# app can push scripts to the same paths push_scripts.sh used, and dedicates
|
|
# a small subdir for its SQLite state.
|
|
|
|
[[stack]]
|
|
name = "electric-cherry"
|
|
|
|
[stack.services.web]
|
|
image = "electric-cherry:latest"
|
|
restart = "unless-stopped"
|
|
ports = ["3000:3000"]
|
|
|
|
volumes = [
|
|
"/root/zombies:/root/zombies:rw",
|
|
"/root/zombies/.electric-cherry:/data:rw"
|
|
]
|
|
|
|
# Lets RCON_HOST=host.docker.internal reach game servers running on the
|
|
# same Komodo host without knowing each container's internal IP.
|
|
extra_hosts = ["host.docker.internal:host-gateway"]
|
|
|
|
[stack.services.web.env]
|
|
SHARED_SCRIPTS = "/root/zombies/shared/scripts"
|
|
SERVERS_ROOT = "/root/zombies/t5"
|
|
REL_DEST = "runtime/plutonium/storage/t5/raw/scripts/sp"
|
|
DB_PATH = "/data/cherry.db"
|
|
LEGACY_METADATA = "/root/zombies/script_metadata.json"
|
|
DEPLOY_KEEP_DAYS = "7"
|
|
|
|
# secrets: bind via Komodo's env-file or secret store
|
|
KOMODO_ADDRESS = "https://komodo.example.internal"
|
|
KOMODO_API_KEY = ""
|
|
KOMODO_API_SECRET = ""
|
|
|
|
# RCON — shared password across every T5 Plutonium server in the fleet.
|
|
RCON_PASSWORD = ""
|
|
RCON_HOST = "host.docker.internal"
|
|
RCON_TIMEOUT_MS = "3000"
|