Add VPS deployment automation

This change adds staging and production deployment configuration for the VPS setup, including `.env.deploy.example`, `.env.staging`, and updated production environment values. It also introduces a PowerShell deployment script that builds the app, packages the Next.js artifact, uploads it to the server, and reloads PM2. Package scripts were added for staging and production deploys, and the TypeScript config now excludes legacy `.old` files.
This commit is contained in:
Ichsan Kurniawan
2026-10-05 19:52:11 +07:00
parent ffcf3c6e58
commit d0db9ee429
9 changed files with 919 additions and 235 deletions
+3 -1
View File
@@ -18,7 +18,9 @@
"start": "next start -p 7002",
"lint": "eslint",
"install:clean": "git pull origin master && rm -rf node_modules package-lock.json .next && npm install --legacy-peer-deps",
"build:prod": "git pull origin master && rm -rf .next/ package-lock.json && pm2 stop 6 && npm run build && pm2 restart 6"
"build:prod": "git pull origin master && rm -rf .next/ package-lock.json && pm2 stop 6 && npm run build && pm2 restart 6",
"deploy:staging": "powershell -ExecutionPolicy Bypass -File ./deploy.ps1 -Target staging",
"deploy:prod": "powershell -ExecutionPolicy Bypass -File ./deploy.ps1 -Target production"
},
"dependencies": {
"@bprogress/next": "^3.2.12",