Spec 041 — Production docs: installation, deployment, backup, env template - #122
Merged
Conversation
…stent token column reference, ondrej PPA hint
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.
Closes #121
Spec:
specs/phase-9-polish/041-production-docs.mdSummary
docs/installation.md(OS prereqs + first-time setup),docs/deployment.md(Supervisor and systemd unit files for Horizon / scheduler / Reverb + Nginx reference config + post-deploy checklist),docs/backup.md(dump commands +.envhandling + restore drill + quarterly cadence), anddocs/env.production.example(production-shaped env template).ProductionDocsExistTestsmoke test (4 data-provider rows) catches accidental deletion or truncation of any of the four docs.docs/env.production.examplerather than the repo root because the environment sandbox denies writes to any.env*filename; operators copy it to.envon the deploy host either way.Test plan
Self-review notes
Ran superpowers:code-reviewer over the diff. Found and fixed pre-push:
docs/backup.md§"What to back up" claimed `APP_KEY` also encrypts a `token` column on `github_webhook_deliveries`. Confirmed via grep that only `github_connections.access_token` + `refresh_token` carry the `'encrypted'` cast; dropped the third bullet..envfirst, thengit clone ..git clone <url> .refuses to clone into a non-empty directory, so the drill would abort on the clone step. Reordered: clone first, then drop.envin, then DB restore. Security invariant preserved —.env(and thusAPP_KEY) is in place before step 5's DB restore, which is where the encrypted rows actually get read.--databases nexus(embedsCREATE DATABASE/USE nexus), so the restore'smysql ... nexustarget is a no-op override. Dropped the target DB from the restore command + added a note that restoring into a differently-named DB requires stripping theCREATE DATABASE/USElines first.deployment.mdpost-deploy step ranconfig:cache+route:cache+event:cache+view:cacheindividually; consolidated tophp artisan optimizefor consistency with the install guide.installation.md`apt install` block assumed `php8.4-*` packages exist without noting the ondrej/php PPA prerequisite on stock Ubuntu. Added theadd-apt-repository ppa:ondrej/phpprelude + clarified that operators pick one ofmysql/pgsql(not both).migrate:fresh --force+ restore dump on top; deliveredmigrate:status+migrate --forceafter the DB restore, which is the correct call (freshwould drop the just-restored rows). Doc is right; spec text is what was outdated. Logged the deviation in the Work log so future-me doesn't "correct" it back.deployment.mdnarrative aroundhorizon:terminatevssupervisorctl restartreads cleaner with the "either / or" framing above the code block. Left for a follow-up polish pass.Bookkeeping
Spec + tracker flips ride inside this PR (per the workflow's §10 pattern):
status: done.specs/README.mdphase-9 row → 🟢 6/6.specs/phase-9-polish/README.mdtask 041 → 🟢.README.mdphase tracker → phases 6–9 all synced to 🟢 (they'd fallen out of date over the last few merges).Phase 9 closes on this merge. Next unexplored slice is Phase 10 (Future Innovation).