Add comprehensive project documentation and Docker infrastructure for Paper Dynasty Real-Time Game Engine - a web-based multiplayer baseball simulation platform replacing the legacy Google Sheets system. Documentation Added: - Complete PRD (Product Requirements Document) - Project README with dual development workflows - Implementation guide with 5-phase roadmap - Architecture docs (backend, frontend, database, WebSocket) - CLAUDE.md context files for each major directory Infrastructure Added: - Root docker-compose.yml for full stack orchestration - Dockerfiles for backend and both frontends (multi-stage builds) - .dockerignore files for optimal build context - .env.example with all required configuration - Updated .gitignore for Python, Node, Nuxt, and Docker Project Structure: - backend/ - FastAPI + Socket.io game engine (Python 3.11+) - frontend-sba/ - SBA League Nuxt 3 frontend - frontend-pd/ - PD League Nuxt 3 frontend - .claude/implementation/ - Detailed implementation guides Supports two development workflows: 1. Local dev (recommended): Services run natively with hot-reload 2. Full Docker: One-command stack orchestration for testing/demos Next: Phase 1 implementation (backend/frontend foundations)
121 lines
3.1 KiB
YAML
121 lines
3.1 KiB
YAML
# Paper Dynasty Game Engine - Full Stack Orchestration
|
|
# Use this for integration testing, demos, or when you want everything containerized
|
|
# For daily dev, see README.md for local development workflow
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# Redis cache (shared dependency)
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
# FastAPI Game Backend
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
# Application
|
|
- APP_ENV=development
|
|
- DEBUG=true
|
|
- SECRET_KEY=${SECRET_KEY:-dev-secret-key-change-in-production}
|
|
|
|
# Database (using host machine's PostgreSQL)
|
|
- DATABASE_URL=${DATABASE_URL}
|
|
|
|
# Redis
|
|
- REDIS_URL=redis://redis:6379
|
|
|
|
# Discord OAuth
|
|
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
|
|
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET}
|
|
- DISCORD_REDIRECT_URI=${DISCORD_REDIRECT_URI:-http://localhost:3000/auth/callback}
|
|
|
|
# League APIs
|
|
- SBA_API_URL=${SBA_API_URL}
|
|
- SBA_API_KEY=${SBA_API_KEY}
|
|
- PD_API_URL=${PD_API_URL}
|
|
- PD_API_KEY=${PD_API_KEY}
|
|
|
|
# CORS
|
|
- CORS_ORIGINS=http://localhost:3000,http://localhost:3001
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
volumes:
|
|
# Mount source code for hot-reload during development
|
|
- ./backend/app:/app/app:ro
|
|
- ./backend/logs:/app/logs
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# SBA League Frontend
|
|
frontend-sba:
|
|
build:
|
|
context: ./frontend-sba
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NUXT_PUBLIC_LEAGUE_ID=sba
|
|
- NUXT_PUBLIC_LEAGUE_NAME=Super Baseball Alliance
|
|
- NUXT_PUBLIC_API_URL=http://localhost:8000
|
|
- NUXT_PUBLIC_WS_URL=http://localhost:8000
|
|
- NUXT_PUBLIC_DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
|
|
- NUXT_PUBLIC_DISCORD_REDIRECT_URI=http://localhost:3000/auth/callback
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
volumes:
|
|
# Mount source for hot-reload
|
|
- ./frontend-sba:/app
|
|
- /app/node_modules
|
|
- /app/.nuxt
|
|
restart: unless-stopped
|
|
|
|
# PD League Frontend
|
|
frontend-pd:
|
|
build:
|
|
context: ./frontend-pd
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3001:3001"
|
|
environment:
|
|
- NUXT_PUBLIC_LEAGUE_ID=pd
|
|
- NUXT_PUBLIC_LEAGUE_NAME=Paper Dynasty
|
|
- NUXT_PUBLIC_API_URL=http://localhost:8000
|
|
- NUXT_PUBLIC_WS_URL=http://localhost:8000
|
|
- NUXT_PUBLIC_DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
|
|
- NUXT_PUBLIC_DISCORD_REDIRECT_URI=http://localhost:3001/auth/callback
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
volumes:
|
|
# Mount source for hot-reload
|
|
- ./frontend-pd:/app
|
|
- /app/node_modules
|
|
- /app/.nuxt
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
redis_data:
|
|
|
|
networks:
|
|
default:
|
|
name: paperdynasty-network |