Add Komodo for centralized Docker container and server management. Features: - Docker container deployment and management - Server monitoring and resource tracking - Build system for Docker images from Git repositories - Multi-server support with periphery agents - Webhooks for automatic deployments Stack includes: - Komodo Core (web UI and API) - Komodo Periphery (local Docker agent) - MongoDB (configuration storage) Includes comprehensive configuration with: - Pre-configured .env with all available options - Optional TOML config files for advanced settings - Setup script with pre-deployment validation - Full documentation and security checklist
89 lines
2.2 KiB
Bash
Executable file
89 lines
2.2 KiB
Bash
Executable file
#!/bin/bash
|
|
# Komodo Setup Script
|
|
|
|
set -e
|
|
|
|
echo "==================================="
|
|
echo "Komodo Setup"
|
|
echo "==================================="
|
|
echo ""
|
|
|
|
# Check if running as root
|
|
if [ "$EUID" -eq 0 ]; then
|
|
echo "Please do not run as root"
|
|
exit 1
|
|
fi
|
|
|
|
# Create periphery root directory
|
|
echo "Creating periphery root directory..."
|
|
sudo mkdir -p /etc/komodo
|
|
sudo chown -R $USER:$USER /etc/komodo
|
|
echo "✓ Created /etc/komodo"
|
|
echo ""
|
|
|
|
# Check if .env exists
|
|
if [ ! -f .env ]; then
|
|
echo "Error: .env file not found!"
|
|
echo "Please copy .env.example to .env and configure it first."
|
|
exit 1
|
|
fi
|
|
|
|
# Check for default passwords
|
|
echo "Checking for default passwords..."
|
|
if grep -q "KOMODO_DB_PASSWORD=admin" .env; then
|
|
echo "⚠️ WARNING: Default database password detected!"
|
|
echo " Please update KOMODO_DB_PASSWORD in .env before deployment."
|
|
fi
|
|
|
|
if grep -q "KOMODO_PASSKEY=abc123" .env; then
|
|
echo "⚠️ WARNING: Default passkey detected!"
|
|
echo " Please update KOMODO_PASSKEY in .env before deployment."
|
|
fi
|
|
|
|
echo ""
|
|
echo "==================================="
|
|
echo "Pre-deployment Checklist"
|
|
echo "==================================="
|
|
echo ""
|
|
echo "Before deploying, ensure you have:"
|
|
echo " [ ] Updated KOMODO_DB_PASSWORD to a strong password"
|
|
echo " [ ] Updated KOMODO_PASSKEY to a strong random string"
|
|
echo " [ ] Updated KOMODO_HOST to your domain"
|
|
echo " [ ] Configured TZ (timezone)"
|
|
echo " [ ] Reviewed KOMODO_ENABLE_NEW_USERS setting"
|
|
echo ""
|
|
read -p "Have you completed the checklist above? (y/N) " -n 1 -r
|
|
echo ""
|
|
|
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
echo "Please complete the checklist and run this script again."
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "==================================="
|
|
echo "Deploying Komodo..."
|
|
echo "==================================="
|
|
echo ""
|
|
|
|
# Deploy
|
|
docker compose up -d
|
|
|
|
echo ""
|
|
echo "==================================="
|
|
echo "Deployment Complete!"
|
|
echo "==================================="
|
|
echo ""
|
|
echo "Access Komodo at: https://komodo.fig.systems"
|
|
echo ""
|
|
echo "First-time setup:"
|
|
echo " 1. Open the URL above"
|
|
echo " 2. Create your admin account"
|
|
echo " 3. Configure servers and resources"
|
|
echo ""
|
|
echo "To view logs:"
|
|
echo " docker compose logs -f"
|
|
echo ""
|
|
echo "To stop:"
|
|
echo " docker compose down"
|
|
echo ""
|