diff --git a/serverinfo/192.168.1.26/bigbike-post-receive b/serverinfo/192.168.1.26/bigbike-post-receive index 9dfa123..7dd6d17 100644 --- a/serverinfo/192.168.1.26/bigbike-post-receive +++ b/serverinfo/192.168.1.26/bigbike-post-receive @@ -31,8 +31,8 @@ BACKEND_PORT=3005 SSR_PORT=3002 # 5. ENVIRONMENT VARIABLES -export PORT="$SSR_PORT" export BACKEND_PORT="$BACKEND_PORT" +export SSR_PORT="$SSR_PORT" export VITE_API_URL="https://api.bigbike.ddcsprocket.com/api" export NEXT_PUBLIC_API_URL="https://api.bigbike.ddcsprocket.com/api" @@ -73,7 +73,7 @@ if [ -d "apps/backend" ]; then echo ">>> Restarting PM2 process: $PM2_NAME_BACKEND..." if $PM2 describe "$PM2_NAME_BACKEND" > /dev/null 2>&1; then - $PM2 restart "$PM2_NAME_BACKEND" --update-env + PORT=$BACKEND_PORT $PM2 restart "$PM2_NAME_BACKEND" --update-env else echo ">>> Starting $PM2_NAME_BACKEND for the first time on port $BACKEND_PORT..." PORT=$BACKEND_PORT $PM2 start "$BUN" --name "$PM2_NAME_BACKEND" --cwd "$WORK_DIR/apps/backend" -- run src/index.ts diff --git a/serverinfo/192.168.1.26/bigbike.ddcsprocket.com/hook/post-receive b/serverinfo/192.168.1.26/bigbike.ddcsprocket.com/hook/post-receive index 9dfa123..7dd6d17 100644 --- a/serverinfo/192.168.1.26/bigbike.ddcsprocket.com/hook/post-receive +++ b/serverinfo/192.168.1.26/bigbike.ddcsprocket.com/hook/post-receive @@ -31,8 +31,8 @@ BACKEND_PORT=3005 SSR_PORT=3002 # 5. ENVIRONMENT VARIABLES -export PORT="$SSR_PORT" export BACKEND_PORT="$BACKEND_PORT" +export SSR_PORT="$SSR_PORT" export VITE_API_URL="https://api.bigbike.ddcsprocket.com/api" export NEXT_PUBLIC_API_URL="https://api.bigbike.ddcsprocket.com/api" @@ -73,7 +73,7 @@ if [ -d "apps/backend" ]; then echo ">>> Restarting PM2 process: $PM2_NAME_BACKEND..." if $PM2 describe "$PM2_NAME_BACKEND" > /dev/null 2>&1; then - $PM2 restart "$PM2_NAME_BACKEND" --update-env + PORT=$BACKEND_PORT $PM2 restart "$PM2_NAME_BACKEND" --update-env else echo ">>> Starting $PM2_NAME_BACKEND for the first time on port $BACKEND_PORT..." PORT=$BACKEND_PORT $PM2 start "$BUN" --name "$PM2_NAME_BACKEND" --cwd "$WORK_DIR/apps/backend" -- run src/index.ts