Files
SportstimeAPI/docker-compose.unraid.yml
Trey t 63acf7accb feat: add Django web app, CloudKit sync, dashboard, and game_datetime_utc export
Adds the full Django application layer on top of sportstime_parser:
- core: Sport, Team, Stadium, Game models with aliases and league structure
- scraper: orchestration engine, adapter, job management, Celery tasks
- cloudkit: CloudKit sync client, sync state tracking, sync jobs
- dashboard: staff dashboard for monitoring scrapers, sync, review queue
- notifications: email reports for scrape/sync results
- Docker setup for deployment (Dockerfile, docker-compose, entrypoint)

Game exports now use game_datetime_utc (ISO 8601 UTC) instead of
venue-local date+time strings, matching the canonical format used
by the iOS app.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:04:27 -06:00

115 lines
3.1 KiB
YAML

services:
db:
image: postgres:15-alpine
container_name: sportstime-db
restart: unless-stopped
volumes:
- /mnt/user/appdata/SportsTimeScraper/postgres:/var/lib/postgresql/data
environment:
POSTGRES_DB: sportstime
POSTGRES_USER: sportstime
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sportstime -d sportstime"]
interval: 10s
timeout: 5s
retries: 5
networks:
- sportstime
redis:
image: redis:7-alpine
container_name: sportstime-redis
restart: unless-stopped
volumes:
- /mnt/user/appdata/SportsTimeScraper/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- sportstime
web:
build: .
container_name: sportstime-web
restart: unless-stopped
volumes:
- /mnt/user/appdata/SportsTimeScraper/static:/app/staticfiles
- /mnt/user/appdata/SportsTimeScraper/media:/app/media
- /mnt/user/appdata/SportsTimeScraper/logs:/app/logs
- /mnt/user/appdata/SportsTimeScraper/secrets:/app/secrets
- /mnt/user/downloads/SportsTimeData:/app/output
ports:
- "8842:8000"
env_file:
- .env
environment:
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- ALLOWED_HOSTS=localhost,127.0.0.1,10.3.3.11
- SESSION_COOKIE_SECURE=False
- CSRF_COOKIE_SECURE=False
- DJANGO_SUPERUSER_USERNAME=${ADMIN_USERNAME:-admin}
- DJANGO_SUPERUSER_PASSWORD=${ADMIN_PASSWORD:-changeme}
- DJANGO_SUPERUSER_EMAIL=${ADMIN_EMAIL:-admin@localhost}
- IMPORT_INITIAL_DATA=${IMPORT_INITIAL_DATA:-false}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- sportstime
command: gunicorn sportstime.wsgi:application --bind 0.0.0.0:8000 --workers 3 --timeout 120
celery-worker:
build: .
container_name: sportstime-celery-worker
restart: unless-stopped
volumes:
- /mnt/user/appdata/SportsTimeScraper/logs:/app/logs
- /mnt/user/appdata/SportsTimeScraper/secrets:/app/secrets
- /mnt/user/downloads/SportsTimeData:/app/output
env_file:
- .env
environment:
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
entrypoint: []
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- sportstime
command: celery -A sportstime worker -l INFO --concurrency=2
celery-beat:
build: .
container_name: sportstime-celery-beat
restart: unless-stopped
volumes:
- /mnt/user/appdata/SportsTimeScraper/celerybeat:/app/celerybeat
- /mnt/user/appdata/SportsTimeScraper/secrets:/app/secrets
env_file:
- .env
environment:
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
entrypoint: []
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- sportstime
command: celery -A sportstime beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
networks:
sportstime:
driver: bridge