fix: use deploy package for ci blue-green settings
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m42s

This commit is contained in:
2026-07-01 14:35:24 +09:00
parent 777cdcd918
commit 7602f5be59
+24 -26
View File
@@ -12,32 +12,6 @@ if [ "${TAXBAIK_DEPLOY_FROM_CI:-}" != "1" ]; then
exit 1 exit 1
fi fi
if [ ! -s "$DEPLOY_HOME/taxbaik_active/appsettings.Production.json" ]; then
echo "❌ Missing production settings: $DEPLOY_HOME/taxbaik_active/appsettings.Production.json" >&2
exit 1
fi
if [ ! -s "$DEPLOY_HOME/taxbaik_active/proxy/TaxBaik.Proxy.dll" ]; then
echo "❌ Missing proxy artifact: $DEPLOY_HOME/taxbaik_active/proxy/TaxBaik.Proxy.dll" >&2
exit 1
fi
# 0. Ensure the local TCP proxy exists and is running.
# Nginx and external traffic always enter through 127.0.0.1:5001.
if ! ss -tln | grep -q ':5001 '; then
if [ -f "$DEPLOY_HOME/taxbaik_active/proxy/TaxBaik.Proxy.dll" ]; then
echo "=== Starting proxy on 127.0.0.1:5001 ==="
cd "$DEPLOY_HOME/taxbaik_active/proxy"
nohup /usr/bin/dotnet TaxBaik.Proxy.dll > "$DEPLOY_HOME/taxbaik_proxy.log" 2>&1 &
sleep 2
fi
fi
if ! ss -tln | grep -q ':5001 '; then
echo "❌ Proxy on 127.0.0.1:5001 is not running. Abort deploy." >&2
exit 1
fi
# 1. Determine active port # 1. Determine active port
ACTIVE_PORT=5003 ACTIVE_PORT=5003
if [ -f "$PORT_FILE" ]; then if [ -f "$PORT_FILE" ]; then
@@ -64,6 +38,30 @@ fi
echo "Deploy Directory: $DEPLOY_DIR" echo "Deploy Directory: $DEPLOY_DIR"
if [ ! -s "$DEPLOY_DIR/appsettings.Production.json" ]; then
echo "❌ Missing production settings: $DEPLOY_DIR/appsettings.Production.json" >&2
exit 1
fi
if [ ! -s "$DEPLOY_DIR/proxy/TaxBaik.Proxy.dll" ]; then
echo "❌ Missing proxy artifact: $DEPLOY_DIR/proxy/TaxBaik.Proxy.dll" >&2
exit 1
fi
# 0. Ensure the local TCP proxy exists and is running.
# Nginx and external traffic always enter through 127.0.0.1:5001.
if ! ss -tln | grep -q ':5001 '; then
echo "=== Starting proxy on 127.0.0.1:5001 ==="
cd "$DEPLOY_DIR/proxy"
nohup /usr/bin/dotnet TaxBaik.Proxy.dll > "$DEPLOY_HOME/taxbaik_proxy.log" 2>&1 &
sleep 2
fi
if ! ss -tln | grep -q ':5001 '; then
echo "❌ Proxy on 127.0.0.1:5001 is not running. Abort deploy." >&2
exit 1
fi
# 4. Start the new app on the target port # 4. Start the new app on the target port
echo "=== Starting New App on Port $TARGET_PORT ===" echo "=== Starting New App on Port $TARGET_PORT ==="
cd "$DEPLOY_DIR" cd "$DEPLOY_DIR"