import React, { useState } from 'react'; import { Button } from './ui/button'; import { Copy, Check, Terminal, Container, Cloud } from 'lucide-react'; type InstallMethod = 'docker' | 'manual' | 'proxmox'; export function Installation() { const [activeMethod, setActiveMethod] = useState('docker'); const [copiedCommand, setCopiedCommand] = useState(null); const copyToClipboard = async (text: string, commandId: string) => { await navigator.clipboard.writeText(text); setCopiedCommand(commandId); setTimeout(() => setCopiedCommand(null), 2000); }; const installMethods = { docker: { icon: Container, title: "Docker", description: "Recommended for most users", steps: [ { title: "Clone the repository", command: "git clone https://github.com/RayLabsHQ/gitea-mirror.git && cd gitea-mirror", id: "docker-clone" }, { title: "Start with Docker Compose", command: "docker compose -f docker-compose.alt.yml up -d", id: "docker-start" }, { title: "Access the application", command: "# Open http://localhost:4321 in your browser", id: "docker-access" } ] }, manual: { icon: Terminal, title: "Manual", description: "For development or custom setups", steps: [ { title: "Install Bun runtime", command: "curl -fsSL https://bun.sh/install | bash", id: "manual-bun" }, { title: "Clone and setup", command: "git clone https://github.com/RayLabsHQ/gitea-mirror.git\ncd gitea-mirror\nbun run setup", id: "manual-setup" }, { title: "Start the application", command: "bun run dev", id: "manual-start" } ] }, proxmox: { icon: Cloud, title: "Proxmox LXC", description: "One-click install for Proxmox VE", steps: [ { title: "Run the installation script", command: 'bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/gitea-mirror.sh)"', id: "proxmox-install" }, { title: "Follow the prompts", command: "# The script will guide you through the setup", id: "proxmox-follow" } ] } }; return (

Get Started in Minutes

Choose your preferred installation method

{/* Installation method tabs */}
{(Object.entries(installMethods) as [InstallMethod, typeof installMethods[InstallMethod]][]).map(([method, config]) => { const Icon = config.icon; return ( ); })}
{/* Installation steps */}
{installMethods[activeMethod].steps.map((step, index) => (
{index + 1}

{step.title}

                        {step.command}
                      
{/* Scroll indicator gradient for mobile */}
{index < installMethods[activeMethod].steps.length - 1 && (
)}
))}
{/* Additional info */}

First user becomes admin. After installation, create your account and configure GitHub and Gitea connections through the web interface.

); }