#!/bin/bash # Deploy script for tilbudsgiveren.alw.dk # This script builds frontend and restarts the PM2 services echo "🚀 Deploying Tilbudsgiveren..." # Navigate to project root cd /data/tilbudgivern # Pull latest changes (if using git) echo "📥 Pulling latest changes..." git pull origin main # Install/update dependencies echo "📦 Installing dependencies..." npm install # Backend dependencies cd backend npm install cd .. # Frontend dependencies and build echo "🏗️ Building frontend..." cd frontend npm install npm run build cd .. # Restart PM2 services echo "🔄 Restarting services..." pm2 restart tilbudgivern-unified # Show status echo "✅ Deployment complete!" pm2 status echo "" echo "🌐 Application is available at:" echo " https://tilbudsgiveren.alw.dk" echo "" echo "🔍 Monitor logs with:" echo " pm2 logs tilbudgivern-unified"