✨ Features: - Analytics Dashboard with real-time metrics - Redis caching for performance optimization - Import/Export functionality for projects - Complete admin system with security - Production-ready Docker setup 🔧 Technical: - Removed Ghost CMS dependencies - Added Redis container with caching - Implemented API response caching - Enhanced admin interface with analytics - Optimized for dk0.dev domain 🛡️ Security: - Admin authentication with Basic Auth - Protected analytics endpoints - Secure environment configuration 📊 Analytics: - Performance metrics dashboard - Project statistics visualization - Real-time data with caching - Umami integration for GDPR compliance 🎯 Production Ready: - Multi-container Docker setup - Health checks for all services - Automatic restart policies - Resource limits configured - Ready for Nginx Proxy Manager
64 lines
1.3 KiB
Bash
Executable File
64 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Quick Deploy Script für lokale Entwicklung
|
|
# Schnelles Deployment ohne umfangreiche Tests
|
|
|
|
set -e
|
|
|
|
# Configuration
|
|
CONTAINER_NAME="portfolio-app"
|
|
IMAGE_NAME="portfolio-app"
|
|
PORT=3000
|
|
|
|
# Colors
|
|
GREEN='\033[0;32m'
|
|
BLUE='\033[0;34m'
|
|
RED='\033[0;31m'
|
|
NC='\033[0m'
|
|
|
|
log() {
|
|
echo -e "${BLUE}[$(date +'%H:%M:%S')]${NC} $1"
|
|
}
|
|
|
|
success() {
|
|
echo -e "${GREEN}[SUCCESS]${NC} $1"
|
|
}
|
|
|
|
error() {
|
|
echo -e "${RED}[ERROR]${NC} $1"
|
|
}
|
|
|
|
log "🚀 Quick deployment starting..."
|
|
|
|
# Build Docker image
|
|
log "🏗️ Building Docker image..."
|
|
sudo docker build -t "$IMAGE_NAME:latest" .
|
|
|
|
# Stop existing container
|
|
if [ "$(sudo docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null)" = "true" ]; then
|
|
log "🛑 Stopping existing container..."
|
|
sudo docker stop "$CONTAINER_NAME"
|
|
sudo docker rm "$CONTAINER_NAME"
|
|
fi
|
|
|
|
# Start new container
|
|
log "🚀 Starting new container..."
|
|
sudo docker run -d \
|
|
--name "$CONTAINER_NAME" \
|
|
--restart unless-stopped \
|
|
-p "$PORT:3000" \
|
|
-e NODE_ENV=production \
|
|
"$IMAGE_NAME:latest"
|
|
|
|
# Wait and check health
|
|
log "⏳ Waiting for container to be ready..."
|
|
sleep 5
|
|
|
|
if curl -f "http://localhost:$PORT/api/health" > /dev/null 2>&1; then
|
|
success "✅ Application is running at http://localhost:$PORT"
|
|
else
|
|
error "❌ Health check failed"
|
|
sudo docker logs "$CONTAINER_NAME" --tail=20
|
|
exit 1
|
|
fi
|