Deploy production to the VPS #304
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
spec
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#306 Deploy a preview per PR and remove it on close
amaurycoudr/chess-project
#309 Record the move to the VPS in an ADR superseding 0024
amaurycoudr/chess-project
#310 Retire Render
amaurycoudr/chess-project
Reference
amaurycoudr/chess-project#304
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#303
What to build
https://chess.core-project.spaceserves the app from the VPS, deployed automatically once CI is green onmain.One image carries the built API and the front's build output and serves both from one origin, as the Render start command does today. GitHub Actions builds it and pushes it to GHCR, tagged with the commit SHA and a production tag. A deploy compose, parameterized by stack name, image tag and host, runs it as stack
chess: one replica, restart unless stopped, on the sharedproxynetwork with its Traefik router (host rule,websecure, the Let's Encrypt resolver), publishing no port. The shared Traefik compose that already runs on the VPS is versioned in the repo next to it.The production workflow runs on CI's success on
main, in a concurrency group that queues rather than cancels. It SSHes asdeploywith the deploy key, pinning the VPS's host key, logs the VPS into GHCR with the job's short-lived token for the pull, logs out after, and brings the stack up withORIGIN_ALLOWLISTset to the production origin.Owner step: add the repo secrets the workflow names (deploy key, host, pinned host key).
Seam: Workflow post-conditions
Acceptance criteria
mainwith green CI deploys the image built for that commit, and no deploy runs on a red CIchessruns exactly one container, thathttps://chess.core-project.spaceanswersGET /with a valid certificate, thathttp://redirects to HTTPS, and that noX-Robots-Tag: noindexheader is present; any failed check fails the run, with the HTTPS check retrying within a bounded time for certificate issuancementioned in issue #306
mentioned in issue #309
mentioned in issue #310
mentioned in issue #303
marked this issue as related to #303
marked this issue as related to #310
marked this issue as related to #309
marked this issue as related to #306
mentioned in commit
4745ac98fe