feat: self-hosted installer script (install.sh) #25
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Summary
Add
install.shto the repo root -- a single-command installer for self-hosted Snipe deployments.What to build
Follow the CircuitForge installer pattern documented at:
circuitforge-plans/shared/2026-04-05-installer-pattern.mdThe reference implementation is
circuitforge-orch/install.sh(cf-orch#11).Snipe-specific requirements
cf,snipe, orcircuitforgeenv; offer to createsnipeenv~/.config/circuitforge/snipe.env-- ports (Vue 8509, FastAPI 8510), DB path, optional Heimdall keycompose.ymlwith env_file; no GPU block needed (no cuda)Key installer decisions (captured in pattern doc)
bash install.shshould complete in < 2 min on a fresh Ubuntu boxbash -n install.shpasses before committingInstall troubleshooting findings (2026-04-06 -- Strahl test install)
During a real self-hosted install test on strahl (Debian 13, no API keys), several blockers were found and fixed:
Fixed in this session
1. compose.override.yml broke non-dev installs
The override had
../circuitforge-core:/app/circuitforge-coreas a bind mount. On any machine without the sibling circuitforge-core checkout, Docker creates an empty directory that shadows the installed package, breaking all circuitforge_core imports. Removed the bind mount; the override now only contains live-reload source mounts for api/, app/, tests/.2. compose.yml missing network_mode: host on api
nginx.conf (baked into the web image) proxies /api/ to 172.17.0.1:8510 (Docker bridge gateway). Without network_mode: host, the API only listens inside the container network, causing 502s on all /api/ requests. Added network_mode: host to the base compose.yml.
3. Migration 004 partial-failure loop
SQLites executescript() auto-commits each DDL statement individually. A prior crash mid-migration leaves columns in the DB without the migration being recorded as applied. On the next startup, the runner retries and hits duplicate column name errors. Fixed in cf-core migration runner: on duplicate column name error, strip the offending ADD COLUMN statement and retry until the migration completes, then mark it as applied.
4. manage.sh test command used wrong Python env
The test command prefixed conda run -n job-seeker, which does not exist inside Docker. Fixed to use python -m pytest directly.
Still open (filed separately)
Validated on Strahl (free tier, no API keys)
Related