#!/bin/bash

# Broken Link Finder - Quick Setup Script
# Run this on your Hetzner server after uploading the files

set -e

echo "🔧 Setting up Broken Link Finder..."

# Create output directory
mkdir -p output

# Build the Docker image
echo "📦 Building Docker image..."
docker compose build

echo ""
echo "✅ Setup complete!"
echo ""
echo "Usage:"
echo "  # Test run (5 pages only):"
echo "  docker compose run --rm broken-link-finder python main.py --limit 5"
echo ""
echo "  # Full run (all 43 pages):"
echo "  docker compose up"
echo ""
echo "  # Run with custom delay (2 seconds between requests):"
echo "  docker compose run --rm broken-link-finder python main.py --delay 2.0"
echo ""
echo "Results will be saved to: ./output/broken-links-results.csv"
