Files
nlcc-itinerary/nuxt.config.ts
Joshua Ryder df92ebefb8 fix: Use direct process.env access for email configuration
Simplified email configuration to always use process.env directly instead of
Nuxt runtime config. This ensures Docker environment variables are properly
read at runtime rather than being baked in at build time.

Changes:
- Removed Nuxt runtime config dependency from getEmailConfig()
- Always read EMAIL_* environment variables directly from process.env
- Added comprehensive debug logging to diagnose configuration issues
- Updated nuxt.config.ts with better documentation of runtime config behavior

This ensures environment variables set in docker-compose.yml are properly
used by the application at runtime.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 18:16:35 -05:00

52 lines
1.7 KiB
TypeScript

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: { enabled: true },
modules: [
'@nuxtjs/tailwindcss'
],
app: {
head: {
title: 'New Life Christian Church - Sermons',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'description', content: 'Weekly sermons from New Life Christian Church' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/logos/favicon.ico' },
{ rel: 'preconnect', href: 'https://fonts.googleapis.com' },
{ rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap' }
]
}
},
css: ['~/assets/css/main.css'],
runtimeConfig: {
// Private runtime config (server-side only)
// These are automatically overridden by NUXT_<KEY> environment variables
// Example: NUXT_EMAIL_HOST overrides emailHost
// AUTH_SECRET is now auto-generated and stored in database
authSecret: '',
// Admin credentials - auto-generated on first launch if not provided
adminUsername: 'admin',
adminPassword: '',
// Email configuration - will be overridden by NUXT_EMAIL_* env vars at runtime
emailHost: 'smtp.example.com',
emailPort: '587',
emailUser: 'noreply@example.com',
emailPassword: '',
emailFrom: 'New Life Christian Church <noreply@example.com>',
public: {
// Public config accessible to both client and server
// Overridden by NUXT_PUBLIC_SITE_URL
siteUrl: 'http://localhost:3000'
}
}
})