strat-gameplay-webapp/frontend-pd/nuxt.config.ts
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

32 lines
900 B
TypeScript

export default defineNuxtConfig({
modules: ['@nuxtjs/tailwindcss', '@pinia/nuxt'],
runtimeConfig: {
public: {
leagueId: 'pd',
leagueName: 'Paper Dynasty',
apiUrl: process.env.NUXT_PUBLIC_API_URL || 'http://localhost:8000',
wsUrl: process.env.NUXT_PUBLIC_WS_URL || 'http://localhost:8000',
discordClientId: process.env.NUXT_PUBLIC_DISCORD_CLIENT_ID || '',
discordRedirectUri: process.env.NUXT_PUBLIC_DISCORD_REDIRECT_URI || 'http://localhost:3001/auth/callback',
}
},
compatibilityDate: '2025-07-15',
devtools: { enabled: true },
// Vite config for external hostname access
// Configure NUXT_ALLOWED_HOSTS env var for your domains (comma-separated)
vite: {
server: {
allowedHosts: process.env.NUXT_ALLOWED_HOSTS?.split(',') || ['localhost', '127.0.0.1']
}
},
typescript: {
strict: true,
typeCheck: true
}
})