Simplify local install: merge migrate into server, drop dead scripts#86
Merged
Conversation
… rename compose file - docker-compose.local.yml -> docker-compose.yml (this is now the only recommended install path, so it gets the name docker compose looks for by default) - Merge the one-shot parsar-init container into parsar-server's own startup (parsar-migrate && exec parsar-server); goose migrations are idempotent so re-running them on every restart is a cheap no-op. Drops a container from every install and removes a depends_on hop. - install.sh: fix a curl-pipe-to-bash bug where `docker compose exec` in the health-check loop inherited stdin from the same pipe still delivering the unparsed tail of the script, silently swallowing the closing "Open: http://..." banner. Redirect all docker invocations from /dev/null. - Makefile: drop `docker-image-info` (never referenced anywhere) and `seed-dev` (wrote an inert JSON file nothing reads; the real dev seed path is server/internal/dev/fixtures.go) - packages/cli: remove the now-orphaned `seed-dev` subcommand - scripts/setup.sh absorbs scripts/parsar-paths.sh via a `paths` mode flag, since the latter was a pure read-only wrapper with no other consumers - docs/deploy/lan-deploy.md: sync container topology + filenames, and fix a pre-existing inaccuracy (claimed parsar-init auto-generates PARSAR_MASTER_KEY and prints it to logs; no such code path exists — operators must generate it themselves) Verified end-to-end via ./install.sh against a fresh Postgres volume: migrations apply on cold start, survive container restarts without touching existing data, and the closing banner now prints correctly under curl | bash. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parsar-initcontainer intoparsar-server's own startup (parsar-migrate && exec parsar-server) — goose migrations are idempotent, so this is a safe no-op on every restart, and it drops a container from every install.docker-compose.local.yml→docker-compose.yml, now the only recommended install path and docker compose's default filename (docker compose upworks without-f).curl | bashbug ininstall.sh:docker compose execin the health-check loop inherited stdin from the same pipe still delivering the unparsed tail of the script, silently swallowing the closing "Open: http://..." banner. All docker invocations now redirect from/dev/null.make docker-image-info(never referenced),make seed-dev/ CLIseed-devsubcommand (wrote an inert JSON file nothing reads — the real dev seed path isserver/internal/dev/fixtures.go),scripts/parsar-paths.sh(absorbed intoscripts/setup.shvia apathsmode flag).docs/deploy/lan-deploy.md: sync container topology/filenames, and fix a pre-existing inaccuracy (doc claimedparsar-initauto-generatesPARSAR_MASTER_KEYand prints it to logs — no such code path exists; operators must generate it themselves).Test plan
./install.shagainst a fully empty Postgres volume — confirmed cold-start migrations apply (goose_db_versionpopulated),/healthzand/api/v1/bootstrap/statusrespond correctly, only 2 containers (postgres,parsar-server)POST /api/v1/bootstrap, restartedparsar-server, confirmed the owner survives and the restart+migrate no-op completes in ~2scurl | bash-style piped run ofinstall.shprints the closing banner correctlybash -noninstall.sh/scripts/setup.sh,docker compose config --quietondocker-compose.yml,tsc --noEmitonpackages/cliall passdocker-compose.local.yml,parsar-init,seed-dev,docker-image-info, orparsar-paths.sh🤖 Generated with Claude Code