#!/usr/bin/env bash
# docker-test.sh — Build and run Queue North Website in Docker for testing
# Usage: ./scripts/docker-test.sh
# Access: http://localhost:3001

set -euo pipefail
cd "$(dirname "$0")/.."

# Stop and remove existing container
DOCKER_API_VERSION=1.44 docker compose down 2>/dev/null || true

# Clean build
rm -rf dist node_modules/.vite 2>/dev/null

DOCKER_API_VERSION=1.44 docker compose up -d --build

echo "✓ Running on http://localhost:3001"
echo "  Health check: http://localhost:3001/api/health"