Recreate containers when a deploy rebuilds their image #2

Merged
reudy merged 1 commit from redeploy-fix into main 2026-09-27 22:44:23 +02:00

1 commit

Author SHA1 Message Date
0cf5c4bc02 Recreate containers when a deploy rebuilds their image
podman-compose only recreates containers when the compose file's own hash
changes. A push that only changed code built a new image, but the running
containers kept the old one. Deploys now build first and pass
--force-recreate when a container's image ID no longer matches its tag.

Compose calls also pass -p with the app's name. Without it, compose named
the project after the compose file's directory, so every git app
(stacks/<app>/repo/compose.yaml) was the project "repo". That broke the
terminal and monitoring checks, and --remove-orphans could remove another
git app's containers. On its next deploy or restart, an app's containers
from the old project are removed and recreated under the new name. An app
whose containers use named volumes keeps the old project (recorded as
APP_COMPOSE_PROJECT), since its volumes are named after it; for those apps
panelctl skips --remove-orphans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UbWSNkXxZhYf7eqHTyx3Bf
2026-09-27 20:40:14 +00:00