This commit adds comprehensive high availability, disaster recovery,
and automation capabilities for enterprise-grade deployment.
High Availability Features:
- Keepalived integration for Virtual IP (38.14.254.100)
- Automatic failover monitoring and recovery
- PostgreSQL streaming replication support
- Health check scripts with auto-restart
- State change notifications
Disaster Recovery:
- Complete system backup script (database, configs, Docker volumes)
- Automated backup with retention policies
- Recovery manifest with step-by-step instructions
- Off-site backup support (S3, rsync ready)
Automation Tools:
- auto-deploy-server.sh - Deploy to remote server from local
- auto-deploy-server.bat - Windows version with WSL/Git Bash support
- deploy-oneclick.sh - One-click deployment on fresh server
- docker-compose-full.yml - Complete containerized stack
Container Orchestration:
- Full Docker Compose setup with all services
- Service dependencies and health checks
- Persistent volumes for data
- Network isolation with dedicated network
- Production-ready configuration
Deployment Automation:
- Automated dependency installation
- Database initialization with tables and indexes
- Monitoring stack auto-deployment
- Service auto-start via systemd
- Firewall auto-configuration
- Cron job automation
New Services:
- moltbot-failover.service - Auto-recovery monitor
- moltbot-metrics.service - Metrics exporter (9101)
- moltbot-log-analyzer.service - Log aggregation (9102)
- keepalived.service - VIP management
Documentation:
- HIGH-AVAILABILITY.md - Complete HA and automation guide
Architecture Improvements:
- Virtual IP for transparent failover
- Health-based service routing
- Automated disaster recovery backups
- Zero-touch server deployment
- Complete container orchestration support
Service Ports:
- Database API: 18800
- Metrics Exporter: 9101
- Log Analyzer: 9102
- Virtual IP: 38.14.254.100
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
64 lines
1.3 KiB
Batchfile
64 lines
1.3 KiB
Batchfile
@echo off
|
|
chcp 65001 >nul
|
|
title Moltbot Automated Server Deployment
|
|
|
|
setlocal enabledelayedexpansion
|
|
|
|
echo ========================================
|
|
echo Moltbot Server Auto Deployment
|
|
echo ========================================
|
|
echo.
|
|
|
|
if "%~1"=="" (
|
|
echo Usage: auto-deploy-server.bat [server-address]
|
|
echo.
|
|
echo Examples:
|
|
echo auto-deploy-server.bat root@192.168.1.100
|
|
echo auto-deploy-server.bat user@example.com
|
|
echo.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
set "SERVER=%~1"
|
|
set "SCRIPT=%~dp0auto-deploy-server.sh"
|
|
|
|
echo Target server: %SERVER%
|
|
echo.
|
|
|
|
if not exist "%SCRIPT%" (
|
|
echo ERROR: auto-deploy-server.sh not found
|
|
echo This script requires the bash deployment script.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo Checking for WSL or Git Bash...
|
|
where wsl.exe >nul 2>&1
|
|
if %errorlevel%==0 (
|
|
echo Using WSL to run deployment script...
|
|
wsl.exe bash "%SCRIPT%" "%SERVER%"
|
|
goto end
|
|
)
|
|
|
|
where bash.exe >nul 2>&1
|
|
if %errorlevel%==0 (
|
|
echo Using Git Bash to run deployment script...
|
|
bash.exe "%SCRIPT%" "%SERVER%"
|
|
goto end
|
|
)
|
|
|
|
echo ERROR: No bash interpreter found
|
|
echo Please install WSL or Git for Windows
|
|
echo.
|
|
pause
|
|
exit /b 1
|
|
|
|
:end
|
|
echo.
|
|
echo ========================================
|
|
echo Deployment Complete!
|
|
echo ========================================
|
|
echo.
|
|
pause
|