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
This commit is contained in:
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user