Each stack runs its own private Postgres, migrated before the app is replaced #369
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
Depends on
#370 The Drizzle Gateway browses every stack through an SSH tunnel
amaurycoudr/chess-project
#371 Production is dumped nightly, checked by a restore, encrypted and kept off the VPS
amaurycoudr/chess-project
#368 The API boots on its database, in dev and in CI
amaurycoudr/chess-project
Reference
amaurycoudr/chess-project#369
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
#354
What to build
Stories 1–6, 10 and 11 of #354. The stack's Compose file gains a database service:
pg_isreadyhealthcheck, and the shared-memory size the image's docs recommend.Every preview gets a caps overlay that the up script layers on, independent of the noindex flag: a small
shared_buffers, about 20 connections, and a container memory limit. Production keeps Postgres's defaults.The up script brings the database up and waits for it to be healthy. It then runs the migrate step (the same image with the migrate entry point, on the stack's internal network) to completion, and only then replaces the app. A failure stops the script before the app is touched, so the old container keeps serving, without relying on Compose's dependency ordering.
The app role owns the schema and is used by the migrate step and the app. Production's password is a GitHub secret passed to the production deploy. A preview's is a fixed throwaway value in the preview overlay.
Password delivery:
The verify script's "exactly one container" check becomes "a healthy app and a healthy database". It also checks:
The removal, cap and reaper paths already remove and check volumes; confirm they cover the database's.
Create the owner
wizardwith the step that sets production's database secrets. See #354, Database per stack, Migrations and Roles and secrets.Seam: the deploy verification scripts, run by the workflows against the VPS;
loadConfigunit tests for the password-file setting.Acceptance criteria
loadConfiglets the password-file setting override the URL's password, and leaves the URL alone without it.main.test:slowis green.mentioned in issue #370
mentioned in issue #371
mentioned in issue #354
mentioned in issue #368
marked this issue as related to #354
marked this issue as related to #368
marked this issue as related to #371
marked this issue as related to #370
mentioned in merge request !506