Prepare versioned server releases and production deployment - #8
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba285dfe60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if not re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+", values.get("PAPYRUS_VERSION", "")): | ||
| raise ValueError("PAPYRUS_VERSION must be a release number") |
There was a problem hiding this comment.
Permit the documented digest pin
When an operator follows the deployment runbook's recommendation to pin the published digest, this validation rejects both a digest and a tag-plus-digest value because PAPYRUS_VERSION must be plain SemVer. Since deploy/compose.yml:4 is the only configurable image reference and always prefixes this value as a tag, the supplied deployment path cannot use the recorded digest without modifying tracked Compose code, leaving deployments on the mutable version tag.
Useful? React with 👍 / 👎.
Prepare a versioned server release for the first Google Play client test. Align package/lock metadata to
1.0.0, expose the installed package version in OpenAPI, and build/publish amd64+arm64 GHCR images only when the committed package version changes. Dependency-only edits skip release jobs; manual dispatch supports bootstrap/retry and released tags cannot be reused for a different commit.The container installs a locked, non-editable package using pinned uv and runs as UID 10001 with a writable media directory. Add a separate production Compose stack suitable for a Hetzner VM: Caddy HTTPS for API/PowerSync/web app, private PostgreSQL listeners, persistent database/media/certificate volumes, one migration job, idempotent replication-role/publication bootstrap and a deployment/backup runbook. This does not provision or deploy a live VM.
Validation: 10 database-free release/deployment tests, Ruff/format/Mypy checks, actionlint/ShellCheck, actual ARM64 image build and non-root/media/version checks. A disposable production-shaped stack passed migrations, idempotent PowerSync bootstrap, API+sync health checks, OpenAPI version verification and
alembic checkwith no new upgrade operations; Caddy configuration validated. The disposable stack and volumes were removed. AMD64 image build and public DNS/TLS/SMTP/OAuth/real-device sync remain for CI/host setup.Setup is documented in
deploy/README.md. Supply real domains, persistent secrets, SMTP/OAuth and the matching client web artifact before deployment. Merge/deploy the backward-compatible server before distributing the client; this PR's version change will publish the initial container on master but will not deploy it.Companion PRs: PapyrusReader/client#33 and PapyrusReader/papyrus#8.