Deploy: never remove containers outside the stack

deploy.sh ran `docker compose up --remove-orphans` under the project name
gregkilmer. Any other container in a project of the same name, such as the
old site's when its compose file sits in a folder called gregkilmer, counted
as an orphan and was removed. The stack's own services are all defined in
compose.yaml, so the flag isn't needed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012aSbo2D1qP8cMFQCykf7kx
This commit is contained in:
Claude
2026-10-12 02:16:50 +00:00
parent 10f206c756
commit a945bb08cc
+3 -1
View File
@@ -39,7 +39,9 @@ cp deploy/compose.yaml "$STACK/compose.yaml"
set_setting GK_TAG "$TAG" set_setting GK_TAG "$TAG"
[ -n "$CURRENT" ] && set_setting GK_PREVIOUS_TAG "$CURRENT" [ -n "$CURRENT" ] && set_setting GK_PREVIOUS_TAG "$CURRENT"
if ! compose up -d --remove-orphans --wait --wait-timeout 120; then # No --remove-orphans: another stack may share the project name, and its
# containers must never be touched by this deploy.
if ! compose up -d --wait --wait-timeout 120; then
echo "!! $TAG did not come up healthy" echo "!! $TAG did not come up healthy"
compose ps compose ps
compose logs --tail 50 || true compose logs --tail 50 || true