deploy: pull prebuilt registry images in compose (IMAGE_TAG) + dev/prod split #54
Reference in New Issue
Block a user
No description provided.
Delete Branch "deploy/compose-use-registry-images"
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?
What
Now that the build workflow publishes
app+botimages to the Gitea registry, makedocker-compose.ymlproduction-shaped — it pulls the prebuilt images and never builds — with local builds moved to an explicit dev overlay.docker-compose.yml(production):image:only, nobuild:docker-compose.dev.yml(new, explicit — not auto-loaded): addsbuild:backWhy the split
With
build:andimage:both in one file, Compose givesbuildprecedence forup --build/build, mixing two deployment modes and letting a production host accidentally build. Keepingbuild:out of the base file makes that impossible — production can only pull.Usage
Tagging
Image tag is the
IMAGE_TAGenv var (defaultlatest; pin to an immutablesha-<7>for reproducible deploys / rollback). Keeping the workflow's existinglatest+sha-<7>tags — no auto-semver on merge (that implies human intent; add av*git-tag trigger later if formal releases are wanted). NewIMAGE_TAGdocumented in.env.example; README quick-start updated to the two-file flow.Verified
docker compose configrenders the base as image-only, no build for both services, and the dev overlay addsbuild:back (app →Dockerfile, bot →bot/Dockerfile), withIMAGE_TAGinterpolating for both the default and a pinned value.🤖 Generated with Claude Code
https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
Point the `app` and `bot` services at the images published to the Gitea registry by the build-images workflow, so deploys pull instead of building: image: gitea.whitlocktech.com/uom/website-app:${IMAGE_TAG:-latest} image: gitea.whitlocktech.com/uom/website-bot:${IMAGE_TAG:-latest} `build:` is kept, so `up --build` still works locally; the server runs `docker compose pull && up -d`. IMAGE_TAG defaults to `latest` for routine deploys and pins to an immutable `sha-<7>` build for reproducible deploys / rollback — no per-deploy compose edits. Documented in .env.example + README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQdeploy: pull prebuilt registry images in compose (IMAGE_TAG)to deploy: pull prebuilt registry images in compose (IMAGE_TAG) + dev/prod split