feat: Initial OPHION structure
- Go backend with Fiber framework - Agent for metrics collection - Docker Compose for self-hosted - Auth middleware (JWT + API Keys) - Rate limiting - Install script
This commit is contained in:
49
install.sh
Executable file
49
install.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "🐍 OPHION - Observability Platform Installer"
|
||||
echo "============================================="
|
||||
|
||||
# Check Docker
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "❌ Docker not found. Installing..."
|
||||
curl -fsSL https://get.docker.com | sh
|
||||
fi
|
||||
|
||||
# Check Docker Compose
|
||||
if ! command -v docker-compose &> /dev/null && ! docker compose version &> /dev/null; then
|
||||
echo "❌ Docker Compose not found. Please install it."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create directory
|
||||
INSTALL_DIR="${OPHION_DIR:-/opt/ophion}"
|
||||
mkdir -p "$INSTALL_DIR"
|
||||
cd "$INSTALL_DIR"
|
||||
|
||||
# Download docker-compose
|
||||
echo "📥 Downloading OPHION..."
|
||||
curl -fsSL https://raw.githubusercontent.com/bigtux/ophion/main/deploy/docker/docker-compose.yml -o docker-compose.yml
|
||||
|
||||
# Generate secrets
|
||||
JWT_SECRET=$(openssl rand -hex 32)
|
||||
echo "JWT_SECRET=$JWT_SECRET" > .env
|
||||
|
||||
# Start services
|
||||
echo "🚀 Starting OPHION..."
|
||||
docker compose up -d
|
||||
|
||||
echo ""
|
||||
echo "✅ OPHION installed successfully!"
|
||||
echo ""
|
||||
echo "📊 Dashboard: http://localhost:3000"
|
||||
echo "🔌 API: http://localhost:8080"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo "1. Open http://localhost:3000 in your browser"
|
||||
echo "2. Create your admin account"
|
||||
echo "3. Add your first server with the agent"
|
||||
echo ""
|
||||
echo "To install the agent on a server:"
|
||||
echo " curl -fsSL https://get.ophion.io/agent | bash"
|
||||
echo ""
|
||||
Reference in New Issue
Block a user