Repository navigation
docs(operate): add a production self-hosting checklist - #121
Merged
Merged
Conversation
Add operate/production-checklist.mdx, an ordered checklist for taking a self-hosted install from the quickstart to a public host: production mode and the dev-mode guard, secrets, signing keys and rotation, origins, the first admin, messaging, Postgres, port binding with TLS and TRUST_PROXY, image verification, backups and restore, upgrades and rollback, running several instances, monitoring, and post go-live checks. Rework operate/deploy.mdx to point at the checklist, drop the internal sibling-repo paths and contributor-only rules, and rewrite the garbled aside about how seamless init picks managed or local. Closes #116
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 #116
What changed
operate/production-checklist.mdx(sidebar order 4.5, right after Running In Production). An ordered, tickable checklist for taking a quickstart install to a public host: where the auth server should sit, production mode and the dev-mode guard, the five secrets, production JWKS keys and rotation,ISSUER/APP_ORIGINS/RPID/ORIGINS/FRONTEND_URL,OWNER_EMAIL, messaging, Postgres (incl. TLS), port binding with TLS andTRUST_PROXY, image verification and digest pinning, backup and restore, upgrades and rollback, one instance versus several, monitoring (/health/statusand itsdegradedfield), and post go-live checks.operate/deploy.mdxreworked. Removed the../seamless-cliinternal paths, the duplicated CLI command list (now links the CLI reference), and the "Documentation Rule" section, which was contributor guidance rather than reader content. Rewrote the garbled aside about howseamless initpicks managed or local, against seamless-cli v0.24.0src/commands/init.ts. The page now sends self-hosters to the checklist.Why a new page rather than a rewrite of deploy.mdx
deploy.mdxanswers "managed or self-hosted, and what does each mean". The checklist is a long procedure a person works through once per deployment and comes back to for upgrades and restores. Keeping them apart keeps the overview short and gives the checklist a stable URL to link from the comparison pages.How it was verified
Every variable was checked against
.env.example,docs/configuration.md,validateEnvs.shand the source at tag v0.19.1. Against the realghcr.io/fells-code/seamless-auth-apiv0.19.1 image I ran:githubWorkflowShamatches the v0.19.1 tag),NODE_ENV=production: the server boots, JWKS publishes the generated kid,/loginreturns an RS256 token with that kid,/docsis 404,NODE_ENV=developmentwith publicISSUER/APP_ORIGINS,TRUST_PROXY=1honouring a forgedX-Forwarded-Forwhen hit directly, and Caddy with the page's Caddyfile shape replacing it with the real client,docker compose run --rm auth migrate,pg_dump/dropdb/createdb/pg_restoresequence (audit hash chain continues after restore),API_SERVICE_TOKENis set, which the page now mentions),jq -e 'has("degraded") | not'health check against both body shapes.The managed-database
pg_dump "$DATABASE_URL"line is standard PostgreSQL usage and was not run against a managed provider.Depends on API PRs #457 and #458
git ls-remotecommands are copied verbatim from itsdocs/production-operations.md#verifying-the-container-image. That section is not in v0.19.1, so the page carries the commands itself and does not link it. Once #457 merges, a link to it (for the SBOM and provenance steps) can be added.access_token_ttl, notrefresh_token_ttl) come from it. The page links the v0.19.1 production operations guide, which still saysrefresh_token_ttlfor the retire step; that is overly cautious rather than unsafe. Once #458 merges, those links can point at the API's main branch or the next tag. TheOWNER_EMAILrole wording (admin:writewhen available) also follows #458 and matchessrc/lib/ownerAdmin.tsat v0.19.1.High availability stays out of scope (#115).
Checks
npx prettier --check .: All matched files use Prettier code style!npm run lint: passes (eslint, check-no-h1, check-sdk-results; no output)npm run typecheck: Result (13 files): 0 errors, 0 warnings, 0 hintsnpm run build: 52 page(s) built, Complete!npm run check:matrix: not run; it already fails on main.