chore: scrub local machine details; fix unsafe deploy/setup.sh - #14
Merged
msitarzewski merged 2 commits intoSep 12, 2026
Merged
Conversation
Eight lines across the testing guide and four 2025-10 task docs hardcoded an absolute home-directory path that embedded a developer's username. Replaced with the ~/ form, which is what a reader should be typing anyway. No behavior change; documentation only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…the domain
setup.sh appended deploy/Caddyfile onto /etc/caddy/Caddyfile. That is both
broken and unsafe: the >> redirect runs in the caller's shell rather than
under sudo, so it fails outright on a root-owned Caddyfile, and where it does
succeed it edits a config shared with every other site on the host. It now
writes a discrete /etc/caddy/sites/<domain>.caddy, and when that directory
does not exist it prints the block and touches nothing.
The operator's own hostname was hardcoded in four places. DOMAIN is now
required input; the Caddy file is an annotated example; ICECAST_HOSTNAME
reads ${PUBLIC_DOMAIN}; the sample manifest points at example.com.
Also in setup.sh: preflight checks for node>=18, docker compose v2, caddy and
git; npm install --production -> npm ci --omit=dev; refuse to fast-forward a
checkout with local modifications; do not overwrite an existing
station-manifest.json; warn that the sample ships CHANGE_ME TURN credentials;
wait for /health rather than assuming the service came up.
Fixes a pre-existing break in docker-compose.prod.yml, which referenced
ICECAST_ADMIN_PASS and ICECAST_RELAY_PASS. Neither name exists in
.env.example or the root compose file, so two of the three `:?` guards
hard-failed for anyone following the documented production path. Aligned to
the canonical ICECAST_*_PASSWORD names; all four variables now resolve.
deploy.sh is gitignored: an operator-local deploy script hardcodes host
names, paths and ports specific to one person's infrastructure and does not
belong in a public repo.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
msitarzewski
deleted the
chore/scrub-local-details-and-fix-deploy-tooling
branch
September 12, 2026 16:34
msitarzewski
added a commit
that referenced
this pull request
Sep 12, 2026
…ubmodule steps Three latent breakages found sweeping the repo. setup.sh could never run. PR #14 changed it to `npm ci`, but package-lock.json is gitignored (.gitignore:6) and no lockfile is tracked, so a fresh clone died immediately: npm error code EUSAGE npm error The `npm ci` command can only install with an existing package-lock.json Reverted to `npm install --omit=dev`, which works either way. Worth deciding separately whether this repo should commit its lockfiles — an application normally should, for reproducible installs; ignoring them is a library convention. Four env vars the server reads were undocumented in .env.example: PORT, ALLOWED_ORIGINS, ICECAST_MOUNT, ICECAST_USER. The consequential one is ALLOWED_ORIGINS — when unset or empty EVERY origin is permitted (server/server.js:53), which is fine for local development and wrong for a public deployment. All four now documented with their real defaults. Docs still instructed `git submodule update --init` for whisper.cpp. PR #13 untracked that gitlink, so the command silently does nothing and leaves users with no whisper.cpp and no error. Corrected across the memory bank to point at ./setup-ai.sh. The 2026-05 task log keeps the old wording on purpose — it is a record of what was true then, not instructions. Co-Authored-By: Claude Opus 5 (1M context) <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.
Two related cleanups for a public repo: remove operator-specific details, and fix the production setup script that carried them.
1. Absolute developer paths in docs
Eight lines across
docs/testing/stability-test-execution-guide.mdand fourmemory-bank/tasks/2025-10/docs hardcoded an absolute home-directory path embedding a username. Replaced with the~/form — which is what a reader should be typing anyway. Documentation only.2.
deploy/setup.shappended to a shared CaddyfileThe script did:
Two problems. The
>>redirect runs in the caller's shell, not under sudo, so on a root-owned Caddyfile it fails outright. And where it does succeed, it mutates a config shared with every other site on the host — on a multi-tenant box a bad append takes down neighbors, not just this app.It now writes a discrete
/etc/caddy/sites/<domain>.caddy. If that directory does not exist, it prints the block and touches nothing.3. The operator's hostname was hardcoded in four files
DOMAINis now required input.deploy/Caddyfileis an annotatedstudio.example.comexample,ICECAST_HOSTNAMEreads${PUBLIC_DOMAIN}, and the sample manifest points atexample.com.4. Pre-existing break in
docker-compose.prod.ymlIt referenced
ICECAST_ADMIN_PASSandICECAST_RELAY_PASS. Neither name exists in.env.exampleor the rootdocker-compose.yml, so two of the three:?guards hard-failed for anyone following the documented production path:Aligned to the canonical
ICECAST_*_PASSWORDnames used everywhere else. All four variables now resolve against.env.example.Other setup.sh hardening
npm install --production->npm ci --omit=devstation-manifest.jsonCHANGE_METURN credentials rather than installing them silently/healthinstead of assuming the service startedAlso
deploy.shis gitignored. An operator-local deploy script hardcodes host names, paths and ports specific to one person's infrastructure; it is not a common process for other users and does not belong in a public repo.Testing
No runtime code changed — nothing under
server/orweb/is touched, so no redeploy is needed once this lands.bash -n deploy/setup.shcleanstation-manifest.production.jsonparses as JSONdocker-compose.prod.ymlparses as YAML, and all four${VAR}references resolve against.env.exampleGit history still contains a since-removed hostname and a private LAN address from older commits. Deliberately not rewriting history — it would break every existing clone and fork for a hostname and an RFC1918 address that mean nothing outside that LAN.
🤖 Generated with Claude Code