Skip to content
Success

Parameters

NODE_BUILD_CMD
Frontend build command
npm install --cache "$NPM_CACHE_DIR" --prefer-offline && npm run build:prod
Deploy to remote server
DEPLOY_MODE
Deploy to local Jenkins server or remote SSH host
local
HOST_JENKINS_DIR
Host path mounted as JENKINS_HOME
/zoumh/data/jenkins
NODE_IMAGE
Container image used for frontend builds
node:20-bullseye
DEPLOY_DIR
Remote frontend artifact directory
/zoumh/java/zmh/frontend
NGINX_HTML_DIR
Frontend static html directory
/zoumh/data/nginx/www/zoumh.com
NGINX_CONF_DIR
Frontend nginx config directory
/zoumh/java/zmh/frontend/nginx
DEPLOY_SCRIPT_DIR
Remote frontend script directory
/zoumh/java/zmh/frontend/bin
SSH_HOST
Deploy host when DEPLOY_MODE=ssh
156.225.28.110
SSH_USER
Deploy user when DEPLOY_MODE=ssh
root
SSH_CREDENTIALS_ID
SSH credentials id in Jenkins
zoumh-ssh
NPM_CACHE_DIR
Persistent npm cache directory
/zoumh/data/jenkins/caches/npm
NGINX_IMAGE
Frontend nginx image
nginx:1.27-alpine
NGINX_CONTAINER_NAME
Frontend container name
ruoyi-nginx
FRONTEND_PROXY_PASS
Backend gateway proxy target
http://127.0.0.1:8080/
POST_DEPLOY_CMD
Optional command after frontend files are extracted
echo "=== live public nginx.conf ===" cat /zoumh/data/nginx/conf/nginx.conf || true echo "=== nginx -T prod-api ===" docker exec nginx sh -lc '"'"'nginx -T 2>/dev/null | grep -n -A6 -B2 "location /prod-api"'"'"' || true echo "=== nginx upstreams ===" docker exec nginx sh -lc '"'"'nginx -T 2>/dev/null | grep -n -A4 -B1 "upstream gateway_server"'"'"' || true echo "=== curl from nginx container to candidate endpoints ===" docker exec nginx sh -lc '"'"'which curl >/dev/null 2>&1 || apk add --no-cache curl >/dev/null 2>&1; echo ---host.docker.internal---; curl -sS -i http://host.docker.internal:8080/auth/login -H "Content-Type: application/json" -d "{""username"":""admin"",""password"":""admin123""}" || true; echo ---172.20.0.1:8080---; curl -sS -i http://172.20.0.1:8080/auth/login -H "Content-Type: application/json" -d "{""username"":""admin"",""password"":""admin123""}" || true'"'"' || true