fix(deploy): add --force-recreate --remove-orphans to handle container conflicts
Some checks failed
Test Runner / test-basic (push) Successful in 9s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Failing after 30s

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:
2025-11-24 22:07:50 +01:00
parent 1f93377ded
commit 6c266861ec

View File

@@ -119,7 +119,9 @@ docker compose $COMPOSE_FILES pull || print_warning "Failed to pull some images,
# Deploy stack # Deploy stack
print_info "Deploying application 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 # Wait for services to be healthy
print_info "Waiting for services to be healthy..." print_info "Waiting for services to be healthy..."