feat: add deployment guide, backup functionality, and cron jobs for automated backups

This commit is contained in:
2025-12-02 11:11:47 +01:00
parent 99853bb755
commit e6fab5ba31
8 changed files with 470 additions and 4 deletions

View File

@@ -24,6 +24,13 @@ node scripts/create-admin.js
echo "🔄 Running database migrations..."
./run-migrations.sh
# Set up daily backup cron job (runs at 2 AM daily)
echo "⏰ Setting up daily backup cron job..."
echo "0 2 * * * cd /app && node backup-db.mjs >> /app/data/backup.log 2>&1" > /etc/cron.d/backup-cron
chmod 0644 /etc/cron.d/backup-cron
crontab /etc/cron.d/backup-cron
service cron start
# Start the application
echo "✅ Starting production server..."
exec npm start