🚀 Complete Production Setup
✨ 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
This commit is contained in:
@@ -32,18 +32,18 @@ log "🚀 Quick deployment starting..."
|
||||
|
||||
# Build Docker image
|
||||
log "🏗️ Building Docker image..."
|
||||
docker build -t "$IMAGE_NAME:latest" .
|
||||
sudo docker build -t "$IMAGE_NAME:latest" .
|
||||
|
||||
# Stop existing container
|
||||
if [ "$(docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null)" = "true" ]; then
|
||||
if [ "$(sudo docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null)" = "true" ]; then
|
||||
log "🛑 Stopping existing container..."
|
||||
docker stop "$CONTAINER_NAME"
|
||||
docker rm "$CONTAINER_NAME"
|
||||
sudo docker stop "$CONTAINER_NAME"
|
||||
sudo docker rm "$CONTAINER_NAME"
|
||||
fi
|
||||
|
||||
# Start new container
|
||||
log "🚀 Starting new container..."
|
||||
docker run -d \
|
||||
sudo docker run -d \
|
||||
--name "$CONTAINER_NAME" \
|
||||
--restart unless-stopped \
|
||||
-p "$PORT:3000" \
|
||||
@@ -58,6 +58,6 @@ 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"
|
||||
docker logs "$CONTAINER_NAME" --tail=20
|
||||
sudo docker logs "$CONTAINER_NAME" --tail=20
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user