apps/console/README.md and lib/watch/types.ts already documented WATCH_AGENT_TOKEN and RAILYARD_WATCH_LIVE as if stacks/gatus-customers/agent.sh existed. It did not -- the console side (agentChecks/recordResults, the /api/v1/watch/agent/* routes) had nothing on the other end to call it, so Watch could never actually turn on. Adds the real box 1 stack: a Gatus probe engine (docker-compose.yml, config.yaml) plus agent.sh, the bridge that pulls the console's check list, regenerates Gatus's config, reads Gatus's own results, and pushes them back -- stateless by design since the console already dedupes by last_checked_at. Plus agent.env.sample, a systemd unit and install.sh (same shape as tools/reconcile-relay-rago). Verified against real components: a real ghcr.io/twin/gatus:stable container and a scratch server wiring the exact shipped lib/watch/http.ts handlers to a MemoryWatchStore, exercised end to end over two passes against a real https://example.com check -- which caught and fixed two real bugs (Gatus refuses to start with zero endpoints; the generated config's timestamp was forcing a gatus restart on every single pass). Container, volume and image removed afterward; apps/console's existing 167 tests and 3 bundle tests pass unchanged (this item touched no console source file).
23 lines
732 B
Desktop File
23 lines
732 B
Desktop File
[Unit]
|
|
Description=Railyard Watch checks agent (PY2.2) — bridges console checks to the box's Gatus probe engine
|
|
Documentation=file:///srv/src/railyard/stacks/gatus-customers/README.md
|
|
Wants=network-online.target docker.service
|
|
After=network-online.target docker.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=/srv/src/railyard/stacks/gatus-customers
|
|
Environment=WATCH_AGENT_ENV_FILE=/etc/products/watch-agent.env
|
|
ExecStartPre=/usr/bin/docker compose -f /srv/src/railyard/stacks/gatus-customers/docker-compose.yml up -d
|
|
ExecStart=/srv/src/railyard/stacks/gatus-customers/agent.sh
|
|
Restart=on-failure
|
|
RestartSec=10s
|
|
Nice=5
|
|
MemoryMax=256M
|
|
NoNewPrivileges=true
|
|
ProtectSystem=full
|
|
PrivateTmp=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|