Files
2025-10-30 18:28:58 +00:00

38 lines
892 B
Bash
Executable File

#!/bin/bash
# Tilbudgivern Quick Deploy Script
# Hurtig version - kun build og restart (uden omfattende tests)
set -e # Stop ved første fejl
# Farver til output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
echo -e "${YELLOW}⚡ Quick Deploy - Build & Restart${NC}"
echo "================================"
# Tjek at vi er i roden
if [ ! -f "package.json" ]; then
echo -e "${RED}❌ Ikke i rod af projekt${NC}"
exit 1
fi
# Build frontend
echo -e "${YELLOW}🏗️ Building...${NC}"
cd frontend && npm run build > /dev/null 2>&1 || {
echo -e "${RED}❌ Build fejlede${NC}"
exit 1
}
cd ..
# Restart server
echo -e "${YELLOW}🔄 Restarting...${NC}"
pm2 restart tilbudgivern-unified > /dev/null 2>&1 || {
echo -e "${RED}❌ Restart fejlede${NC}"
exit 1
}
echo -e "${GREEN}✅ Done! Server kører på http://localhost:4031${NC}"