Fix nginx validation in deploy pipeline
TaxBaik CI/CD / build-and-deploy (push) Failing after 55s

This commit is contained in:
2026-07-09 13:14:43 +09:00
parent 98bb05a084
commit 3ed0eb0119
2 changed files with 14 additions and 1 deletions
+5 -1
View File
@@ -175,12 +175,16 @@ echo " ✓ No critical errors in logs"
# 6.2 Nginx 설정 검증
echo " Checking Nginx configuration..."
if ! sudo nginx -t 2>&1 | grep -q "successful"; then
NGINX_TEST_LOG=$(mktemp)
if ! sudo nginx -t >"$NGINX_TEST_LOG" 2>&1; then
echo "❌ Nginx configuration is invalid"
tail -50 "$NGINX_TEST_LOG" 2>/dev/null || true
rm -f "$NGINX_TEST_LOG"
echo "🔙 Rolling back..."
kill -9 $NEW_PID || true
exit 1
fi
rm -f "$NGINX_TEST_LOG"
echo " ✓ Nginx configuration is valid"
# 6.3 프로세스가 여전히 실행 중인지 확인