From 6c266861ecde2eaaeea8d46b1c471f9e658777fa Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Mon, 24 Nov 2025 22:07:50 +0100 Subject: [PATCH] fix(deploy): add --force-recreate --remove-orphans to handle container conflicts Fixes deployment error where existing containers with same name blocked recreation. This ensures clean deployments by: - Force recreating containers even if unchanged - Removing orphan containers not in compose file --- deployment/scripts/deploy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deployment/scripts/deploy.sh b/deployment/scripts/deploy.sh index 20222f83..92f85651 100755 --- a/deployment/scripts/deploy.sh +++ b/deployment/scripts/deploy.sh @@ -119,7 +119,9 @@ docker compose $COMPOSE_FILES pull || print_warning "Failed to pull some images, # Deploy stack print_info "Deploying application stack..." -docker compose $COMPOSE_FILES up -d +# --force-recreate: Recreate containers even if unchanged +# --remove-orphans: Remove containers for services not in compose file +docker compose $COMPOSE_FILES up -d --force-recreate --remove-orphans # Wait for services to be healthy print_info "Waiting for services to be healthy..."