Update environment configuration for PostgreSQL: Add new environment variables for NextAuth and PostgreSQL settings in .env file, update docker-compose.yml to utilize these variables, and enhance README documentation for environment setup. Ensure DATABASE_URL is constructed dynamically if not defined.

This commit is contained in:
Julien Froidefond
2025-12-17 13:15:40 +01:00
parent 2c7a346cde
commit cb02b494f4
7 changed files with 121 additions and 9 deletions

View File

@@ -35,6 +35,9 @@ services:
- "3040:3000"
environment:
- NODE_ENV=production
- POSTGRES_USER=${POSTGRES_USER:-gotgaming}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-change-this-in-production}
- POSTGRES_DB=${POSTGRES_DB:-gotgaming}
- DATABASE_URL=postgresql://${POSTGRES_USER:-gotgaming}:${POSTGRES_PASSWORD:-change-this-in-production}@got-postgres:5432/${POSTGRES_DB:-gotgaming}?schema=public
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3000}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-change-this-secret-in-production}