🚀 Setup automated deployment system with comprehensive credential protection

- 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.
This commit is contained in:
2025-12-27 21:34:08 +11:00
parent b4bddb2aa0
commit d7f534284a
22 changed files with 3540 additions and 0 deletions

33
script.js Normal file
View File

@@ -0,0 +1,33 @@
// ============================================================================
// Git Version Badge - Auto-update from server
// ============================================================================
async function updateVersionBadge() {
try {
const response = await fetch('/api/git-info');
const data = await response.json();
const commitIdEl = document.getElementById('commit-id');
const commitAgeEl = document.getElementById('commit-age');
if (data.error) {
commitIdEl.textContent = 'N/A';
commitAgeEl.textContent = 'Local Dev';
commitIdEl.style.color = 'var(--color-text-muted)';
} else {
commitIdEl.textContent = data.commitId;
commitAgeEl.textContent = data.commitAge;
commitIdEl.style.color = 'var(--color-accent-success)';
}
} catch (error) {
console.error('Failed to fetch git info:', error);
document.getElementById('commit-id').textContent = 'N/A';
document.getElementById('commit-age').textContent = 'Error';
}
}
// Update version badge on page load
document.addEventListener('DOMContentLoaded', updateVersionBadge);
// Optional: Auto-refresh every 5 minutes to show latest version
setInterval(updateVersionBadge, 5 * 60 * 1000);