spire-defense: dockerize + forgejo build pipeline #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/dockerize-forgejo-pipeline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Same treatment as dark-spire (#9/#10 over there), adapted to this project's much simpler runtime.
What's in here
python:3.13-alpineonly; the whole runtime is stdlib (server.py). No node, no build step. Non-root uid 1000, healthcheck on/, port 8768. 70.7 MB image.SPIRE_DATA_DIRenv var relocates the mutable state (diagnostics.db+.orient-logs/) out of the code tree; defaults to the script dir so local dev is unchanged. The/orient-logs/GET handler's realpath containment check follows the relocation.git.hl.c4.io/og_arist0tle/spire-defense:latest, mounts./data:/datafor all server state, passesSPIRE_DIAG_QUERY_KEYthrough,restart: unless-stopped. (Player saves are client-side localStorage — the host mount holds the diagnostics DB and orient logs.)GET /serves the game,POST /api/log→ 204 with rows landing in SQLite, and the query API is 403 when no key is configured.:latestand:<short-sha>on merge to main. Uses thecatthehackerdocker-cli job image and assumes the runner'sdocker_host: "automount"(both already sorted from the dark-spire pipeline).Why CI doesn't run the Playwright suite
tests/*.mjsdrives real Chromium and expects a local dev setup — at least one test hardcodes/home/og/idle-games/spire-defense/diagnostics.dbfrom another machine. Making that suite CI-portable is real work worth doing separately;ci_smoke.pycovers the server surface in the meantime.Verified locally
Smoke test green; image builds; container runs as non-root with the game served, diagnostics POST→key-gated-query roundtrip working, DB files in the
/datavolume (uid 1000), healthcheck healthy.Registry secrets are already set on this repo, so merging should produce a pushed image end-to-end.
https://claude.ai/code/session_01RaLHHSp1qSk9L1oswRD8GJ