Skip to content

Deploy pulls fresh images; stable image IDs (checklist 2.3) - #42

Merged
ltc870 merged 2 commits into
mainfrom
chore/deploy-pull
Nov 20, 2026
Merged

ltc870 merged 2 commits into
mainfrom
chore/deploy-pull

Conversation

@ltc870

@ltc870 ltc870 commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Checklist item 2.3: every image uses a moving tag (postgres:18, tailscale:stable, dotnet sdk/aspnet:10.0, node:24-slim, caddy:2-alpine), and ops/deploy.sh never asked the registries for newer ones, so patches only arrived when the build cache happened to drop a base image.

Changes

  • ops/deploy.sh: compose pull --ignore-buildable, then build --pull, then up -d. PULL=0 ops/deploy.sh skips the pulls (registry outage).
  • ops/deploy.sh: new check that every container runs the image its name points to now; a container left on an old image fails the deploy instead of hiding behind OK.
  • docker-compose.prod.yml: provenance: false for api and caddy. The attestation records the build time, so every build got a new image ID with identical content; Compose (rightly) didn't recreate, which left test's containers on untagged IDs and would make the new check fail on every deploy. The images never leave homeserver.

Tested on studystack-test (Nov 20)

  • Postgres 18.6 to 18.7 (all 180 indexes btree, only plpgsql: no reindex needed per the 18.7 notes); tailscale refreshed.
  • Unchanged builds now export the same manifest every time (api fa5a0a0a, caddy 53eaa5b2); nothing recreated.
  • OK deployed chore/deploy-pull at 70ed312; sign-in, stack, Markdown cards, edit and undo, sign-out all worked.

Production's first deploy

Expect one FAILED: api runs ... (not recreated ...): its last image carried an attestation. One-time cure, then deploy again:
sudo docker compose up -d --force-recreate --no-deps api && ops/deploy.sh
(caddy too if it's named; it is usually recreated anyway along with tailscale).

…cklist 2.3)

compose pull --ignore-buildable, build --pull, then up -d. PULL=0 skips the pulls. New check: each container must run the image its name points to now, or the deploy fails.
@ltc870
ltc870 merged commit cae3261 into main Nov 20, 2026
7 checks passed
@ltc870
ltc870 deleted the chore/deploy-pull branch November 20, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant