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>
This commit is contained in:
113
docker-compose.yml
Normal file
113
docker-compose.yml
Normal file
@@ -0,0 +1,113 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
container_name: sportstime-db
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: sportstime
|
||||
POSTGRES_USER: sportstime
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD:-devpassword}
|
||||
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
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- sportstime
|
||||
|
||||
web:
|
||||
build: .
|
||||
container_name: sportstime-web
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./output:/app/output:ro
|
||||
ports:
|
||||
- "8842:8000"
|
||||
environment:
|
||||
- DEBUG=True
|
||||
- SECRET_KEY=dev-secret-key-not-for-production
|
||||
- ALLOWED_HOSTS=localhost,127.0.0.1,10.3.3.11
|
||||
- SESSION_COOKIE_SECURE=False
|
||||
- CSRF_COOKIE_SECURE=False
|
||||
- DATABASE_URL=postgresql://sportstime:${DB_PASSWORD:-devpassword}@db:5432/sportstime
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- POSTGRES_HOST=db
|
||||
- POSTGRES_PORT=5432
|
||||
- DJANGO_SUPERUSER_USERNAME=admin
|
||||
- DJANGO_SUPERUSER_PASSWORD=admin
|
||||
- DJANGO_SUPERUSER_EMAIL=admin@localhost
|
||||
- IMPORT_INITIAL_DATA=true
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- sportstime
|
||||
|
||||
celery-worker:
|
||||
build: .
|
||||
container_name: sportstime-celery-worker
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- .:/app
|
||||
environment:
|
||||
- DEBUG=True
|
||||
- SECRET_KEY=dev-secret-key-not-for-production
|
||||
- DATABASE_URL=postgresql://sportstime:${DB_PASSWORD:-devpassword}@db:5432/sportstime
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- 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
|
||||
environment:
|
||||
- DEBUG=True
|
||||
- SECRET_KEY=dev-secret-key-not-for-production
|
||||
- DATABASE_URL=postgresql://sportstime:${DB_PASSWORD:-devpassword}@db:5432/sportstime
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- 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
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
networks:
|
||||
sportstime:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user