Add HTTPS support with Caddy and clean up legacy files
- Add Caddy reverse proxy for automatic HTTPS with Let's Encrypt - Update docker-compose.yml with Caddy service and internal networking - Remove all Redis dependencies (not needed for this deployment) - Fix Dockerfile permissions for instance and uploads directories - Move legacy scripts to old_code_documentation folder - add_muted_column.py, check_fix_player.py, migrate_add_edit_enabled.py - docker-start.sh, run_dev.sh, start.sh, clean_for_deployment.sh - Add HTTPS_SETUP.md documentation for Caddy configuration - Update .env.example with DOMAIN and EMAIL variables - Remove redis package from requirements.txt - Remove rate limiting Redis storage from config.py
This commit is contained in:
69
old_code_documentation/docker-start.sh
Executable file
69
old_code_documentation/docker-start.sh
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "🚀 DigiServer v2 - Docker Quick Start"
|
||||
echo "====================================="
|
||||
echo ""
|
||||
|
||||
# Check if Docker is installed
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "❌ Docker is not installed. Please install Docker first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if Docker Compose is installed
|
||||
if ! command -v docker-compose &> /dev/null; then
|
||||
echo "❌ Docker Compose is not installed. Please install Docker Compose first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create .env file if it doesn't exist
|
||||
if [ ! -f .env ]; then
|
||||
echo "📝 Creating .env file..."
|
||||
cp .env.example .env
|
||||
|
||||
# Generate random secret key
|
||||
SECRET_KEY=$(openssl rand -base64 32)
|
||||
sed -i "s/change-this-to-a-random-secret-key/$SECRET_KEY/" .env
|
||||
echo "✅ Created .env with generated SECRET_KEY"
|
||||
fi
|
||||
|
||||
# Create required directories
|
||||
echo "📁 Creating required directories..."
|
||||
mkdir -p instance app/static/uploads
|
||||
echo "✅ Directories created"
|
||||
|
||||
echo ""
|
||||
echo "🔨 Building Docker image..."
|
||||
docker-compose build
|
||||
|
||||
echo ""
|
||||
echo "🚀 Starting DigiServer v2..."
|
||||
docker-compose up -d
|
||||
|
||||
echo ""
|
||||
echo "⏳ Waiting for application to start..."
|
||||
sleep 5
|
||||
|
||||
# Check if container is running
|
||||
if docker-compose ps | grep -q "Up"; then
|
||||
echo ""
|
||||
echo "✅ DigiServer v2 is running!"
|
||||
echo ""
|
||||
echo "📍 Access the application at: http://localhost:5000"
|
||||
echo ""
|
||||
echo "👤 Default credentials:"
|
||||
echo " Username: admin"
|
||||
echo " Password: admin123"
|
||||
echo ""
|
||||
echo "📋 Useful commands:"
|
||||
echo " View logs: docker-compose logs -f"
|
||||
echo " Stop: docker-compose down"
|
||||
echo " Restart: docker-compose restart"
|
||||
echo " Shell access: docker-compose exec digiserver bash"
|
||||
echo ""
|
||||
echo "⚠️ IMPORTANT: Change the admin password after first login!"
|
||||
else
|
||||
echo ""
|
||||
echo "❌ Failed to start DigiServer v2"
|
||||
echo " Check logs with: docker-compose logs"
|
||||
fi
|
||||
Reference in New Issue
Block a user