Final: Complete modernization - Option 1 deployment, unified persistence, migration scripts
- Implement Docker image-based deployment (Option 1) * Code immutable in image, no volume override * Eliminated init-data.sh manual step * Simplified deployment process - Unified persistence in data/ folder * Moved nginx.conf and nginx-custom-domains.conf to data/ * All runtime configs and data in single location * Clear separation: repo (source) vs data/ (runtime) - Archive legacy features * Groups blueprint and templates removed * Legacy playlist routes redirected to content area * Organized in old_code_documentation/ - Added network migration support * New migrate_network.sh script for IP changes * Regenerates SSL certs for new IP * Updates database configuration * Tested workflow: clone → deploy → migrate - Enhanced deploy.sh * Creates data directories * Copies nginx configs from repo to data/ * Validates file existence before deployment * Prevents incomplete deployments - Updated documentation * QUICK_DEPLOYMENT.md shows 4-step workflow * Complete deployment workflow documented * Migration procedures included - Production ready deployment workflow: 1. Clone & setup (.env configuration) 2. Deploy (./deploy.sh) 3. Migrate network (./migrate_network.sh if needed) 4. Normal operations (docker compose restart)
This commit is contained in:
32
deploy.sh
32
deploy.sh
@@ -30,6 +30,38 @@ if [ ! -f "docker-compose.yml" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ============================================================================
|
||||
# INITIALIZATION: Create data directories and copy nginx configs
|
||||
# ============================================================================
|
||||
echo -e "${YELLOW}📁 Initializing data directories...${NC}"
|
||||
|
||||
# Create necessary data directories
|
||||
mkdir -p data/instance
|
||||
mkdir -p data/uploads
|
||||
mkdir -p data/nginx-ssl
|
||||
mkdir -p data/nginx-logs
|
||||
mkdir -p data/certbot
|
||||
|
||||
# Copy nginx configuration files from repo root to data folder
|
||||
if [ -f "nginx.conf" ]; then
|
||||
cp nginx.conf data/nginx.conf
|
||||
echo -e " ${GREEN}✓${NC} nginx.conf copied to data/"
|
||||
else
|
||||
echo -e " ${RED}❌ nginx.conf not found in repo root!${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "nginx-custom-domains.conf" ]; then
|
||||
cp nginx-custom-domains.conf data/nginx-custom-domains.conf
|
||||
echo -e " ${GREEN}✓${NC} nginx-custom-domains.conf copied to data/"
|
||||
else
|
||||
echo -e " ${RED}❌ nginx-custom-domains.conf not found in repo root!${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}✅ Data directories initialized${NC}"
|
||||
echo ""
|
||||
|
||||
# ============================================================================
|
||||
# CONFIGURATION VARIABLES
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user