mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 20:05:58 +00:00
- Added Express server with Git info API endpoint - Created automated deployment scripts (systemd-based, not PM2) - Implemented 5-minute auto-sync with GitHub - Enhanced .gitignore with 200+ credential protection patterns - Added Git version badge to UI footer - Created comprehensive deployment documentation - Added TurnKey Nginx fix for default control panel issue - Included security verification tools All credentials protected and verified safe for deployment.
3.8 KiB
3.8 KiB
🎯 Quick Start - Fill This Out First!
Step 1: Gather Your Information
🖥️ Server Details (from Proxmox)
- Server IP Address:
_____________________ - Root Password:
_____________________ - SSH Port:
22(default)
🔑 GitHub Details
- GitHub Username:
_____________________ - Personal Access Token:
_____________________(Create here)- ✅ Needs
reposcope permissions
- ✅ Needs
- Repository:
DeNNiiInc/Web-Page-Performance-Test(already set)
Step 2: Create deploy-config.json
-
Copy the template:
Copy-Item deploy-config.TEMPLATE.json deploy-config.json -
Edit deploy-config.json with your information from Step 1:
{ "host": "YOUR_SERVER_IP_HERE", "port": 22, "username": "root", "password": "YOUR_ROOT_PASSWORD_HERE", "remotePath": "/var/www/web-page-performance-test", "appName": "web-page-performance-test", "github": { "username": "YOUR_GITHUB_USERNAME_HERE", "token": "YOUR_GITHUB_TOKEN_HERE", "repo": "DeNNiiInc/Web-Page-Performance-Test" } }
Step 3: Deploy! (ONE COMMAND)
.\deploy-local.ps1
That's it! ✅
✅ What This Does Automatically
- ✅ Connects to your Proxmox server via SSH
- ✅ Clones your GitHub repository
- ✅ Installs Node.js dependencies
- ✅ Creates a systemd service (auto-start on boot)
- ✅ Configures Nginx reverse proxy (serves on port 80)
- ✅ Sets up auto-sync (checks GitHub every 5 minutes)
- ✅ Removes credentials from the server after setup
🔄 After Deployment (How to Update)
Option 1: Automatic (Recommended)
Just push to GitHub, wait 5 minutes, it updates automatically! No manual intervention needed.
Option 2: Force Update (Immediate)
ssh root@YOUR_SERVER_IP
cd /var/www/web-page-performance-test
./auto-sync.sh
📊 Useful Commands (SSH into server first)
Check if app is running
systemctl status web-page-performance-test
View app logs
journalctl -u web-page-performance-test -f
View auto-sync logs
tail -f /var/log/web-page-performance-test-autosync.log
Restart app manually
systemctl restart web-page-performance-test
🆘 Troubleshooting
"Connection refused" error
- Check if server IP is correct
- Check if SSH is running:
systemctl status ssh - Try:
ping YOUR_SERVER_IP
"Authentication failed" error
- Double-check root password in
deploy-config.json - Try manually:
ssh root@YOUR_SERVER_IP
App deployed but not accessible
# Check if service is running
systemctl status web-page-performance-test
# Check if Nginx is running
systemctl status nginx
# Test locally on server
curl http://localhost
🎉 Success Checklist
After running .\deploy-local.ps1, you should see:
- ✅ "SSH connection successful!"
- ✅ "Deployment Complete!"
- ✅ Visit
http://YOUR_SERVER_IPin browser - your site loads! - ✅ Wait 5 minutes, make a change, push to GitHub, site updates automatically!
📁 Files You'll Edit
deploy-config.json- Your credentials (ONE TIME, never commit to Git)index.html- Your HTML content (commit to Git)styles.css- Your styles (commit to Git)script.js- Your JavaScript (commit to Git)
🔐 Security Notes
- ✅
deploy-config.jsonis in.gitignore- will NEVER be pushed to GitHub - ✅ GitHub token is removed from server after initial clone
- ✅ Server uses systemd (not PM2) for better security and reliability
- ✅ Nginx serves static files (Node.js only handles API)
📖 Need More Details?
Read the full guide: DEPLOYMENT.md
Ready? Let's go! 🚀