strat-gameplay-webapp/.env.example
Cal Corum 7d28eebd24 CLAUDE: Add multi-domain environment configuration support
- Create frontend-sba/.env.example and frontend-pd/.env.example templates
- Fix hardcoded allowedHosts in nuxt.config.ts (now reads NUXT_ALLOWED_HOSTS)
- Add NUXT_ALLOWED_HOSTS support to frontend-pd/nuxt.config.ts
- Update docker-compose.yml with missing env vars:
  - FRONTEND_URL, DISCORD_SERVER_REDIRECT_URI
  - ALLOWED_DISCORD_IDS, WS_HEARTBEAT_INTERVAL, WS_CONNECTION_TIMEOUT
  - NUXT_ALLOWED_HOSTS for both frontends
- Create docker-compose.prod.yml for production overrides
- Update root .env.example with new variables
- Add "Multi-Domain Deployment" section to README.md with checklist
- Update all CLAUDE.md files with environment configuration docs
- Remove obsolete 'version' attribute from docker-compose files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 13:58:42 -06:00

68 lines
3.0 KiB
Plaintext

# Paper Dynasty Game Engine - Environment Variables
# Copy this file to .env and update with your actual values
# ============================================================================
# Application
# ============================================================================
APP_ENV=development
DEBUG=true
SECRET_KEY=your-secret-key-at-least-32-characters-long
# ============================================================================
# Database
# ============================================================================
# Update with your actual PostgreSQL server credentials
# Format: postgresql+asyncpg://username:password@hostname:port/database
DATABASE_URL=postgresql+asyncpg://paperdynasty:your-password@your-db-server:5432/paperdynasty_dev
# ============================================================================
# Discord OAuth
# ============================================================================
# Get these from Discord Developer Portal: https://discord.com/developers/applications
DISCORD_CLIENT_ID=your-discord-client-id
DISCORD_CLIENT_SECRET=your-discord-client-secret
DISCORD_REDIRECT_URI=http://localhost:3000/auth/callback
DISCORD_SERVER_REDIRECT_URI=http://localhost:8000/api/auth/discord/callback/server
FRONTEND_URL=http://localhost:3000
# ============================================================================
# League REST APIs
# ============================================================================
# SBA League API
SBA_API_URL=https://sba-api.example.com
SBA_API_KEY=your-sba-api-key
# PD League API
PD_API_URL=https://pd-api.example.com
PD_API_KEY=your-pd-api-key
# ============================================================================
# CORS Origins (comma-separated)
# ============================================================================
CORS_ORIGINS=http://localhost:3000,http://localhost:3001
# ============================================================================
# Access Control
# ============================================================================
# Comma-separated Discord user IDs allowed access
# Leave empty or use * for all users (dev only!)
ALLOWED_DISCORD_IDS=
# ============================================================================
# WebSocket Settings
# ============================================================================
WS_HEARTBEAT_INTERVAL=30
WS_CONNECTION_TIMEOUT=60
# ============================================================================
# Redis (optional - for caching)
# ============================================================================
# When using Docker Compose, Redis is automatically available at redis://redis:6379
# When running locally, use redis://localhost:6379
# REDIS_URL=redis://localhost:6379
# ============================================================================
# Frontend Dev Server
# ============================================================================
# Comma-separated hostnames for Vite dev server external access
NUXT_ALLOWED_HOSTS=localhost,127.0.0.1