Files
ciaovolo/flight-comparator/docker-compose.yml
domverse 6421f83ca7 Add flight comparator web app with full scan pipeline
Full-stack flight price scanner built on fast-flights v3 (SOCS cookie bypass):

Backend (FastAPI + SQLite):
- REST API with rate limiting, Pydantic v2 validation, paginated responses
- Scan pipeline: resolves airports, queries every day in the window, saves
  individual flights + aggregate route stats to SQLite
- Background async scan processor with real-time progress tracking
- Airport search endpoint backed by OpenFlights dataset
- Daily scan window (all dates, not monthly samples)

Frontend (React 19 + TypeScript + Tailwind CSS v4):
- Dashboard with live scan status and recent scans
- Create scan form: country mode or specific airports (searchable dropdown)
- Scan detail page with expandable route rows showing individual flights
  (date, airline, departure, arrival, price) loaded on demand
- AirportSearch component with debounced live search and multi-select

Database:
- scans → routes → flights schema with FK cascade and auto-update triggers
- Migrations for schema evolution (relaxed country constraint)

Tests:
- 74 tests: unit + integration, isolated per-test SQLite DB
- Confirmed flight fixtures in tests/confirmed_flights.json (50 real flights,
  BDS→FMM Ryanair + BDS→DUS Eurowings, scraped Feb 2026)
- Integration tests parametrized from confirmed routes

Docker:
- Multi-stage builds, Compose orchestration, Nginx reverse proxy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 17:11:51 +01:00

55 lines
1.3 KiB
YAML

services:
# Backend API Server
backend:
build:
context: .
dockerfile: Dockerfile.backend
container_name: flight-radar-backend
restart: unless-stopped
ports:
- "8000:8000"
environment:
- PORT=8000
- DATABASE_PATH=/app/data/cache.db
- ALLOWED_ORIGINS=http://localhost,http://localhost:80,http://frontend
volumes:
- backend-data:/app/data
- ./cache.db:/app/cache.db:rw
networks:
- flight-radar-network
healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8000/health').raise_for_status()"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
# Frontend UI
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
container_name: flight-radar-frontend
restart: unless-stopped
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
networks:
- flight-radar-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
networks:
flight-radar-network:
driver: bridge
volumes:
backend-data:
driver: local