feat: complete production blue-green deployment

This commit is contained in:
2026-09-20 21:44:27 +08:00
parent e3415a8778
commit b50d59a058
6 changed files with 195 additions and 34 deletions
+13
View File
@@ -188,6 +188,19 @@ if [ "$DEPLOY_ENV" = "development" ]; then
"$IMAGE_REPOSITORY" "$IMAGE_TAG" "$SERVICE_CSV" "$ENV_FILE"
fi
if [ "$DEPLOY_ENV" = "production" ]; then
docker compose \
--project-name "$PROJECT_NAME" \
--env-file "$ENV_FILE" \
-f "$COMPOSE_FILE" \
pull $SERVICES
for service in $SERVICES; do
sh deploy/scripts/deploy-blue-green-service.sh \
"$DEPLOY_ENV" "$IMAGE_REPOSITORY" "$IMAGE_TAG" "$service" "$ENV_FILE" "$COMPOSE_FILE" "$PROJECT_NAME"
done
exit 0
fi
docker compose \
--project-name "$PROJECT_NAME" \
--env-file "$ENV_FILE" \