mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-18 11:59:26 +00:00
4.8 KiB
4.8 KiB
Environment Variables for Coolify Deployments
⚠️ SECURITY NOTE: This file contains placeholder values only. Replace ALL
YOUR_*placeholders with your actual secure values before deployment. Never commit actual secrets to version control.
Placeholder Values to Replace:
YOUR_DEV_REDIS_PASSWORD- Strong password for development Redis instanceYOUR_LIVE_REDIS_PASSWORD- Strong password for production Redis instanceYOUR_DEV_DB_PASSWORD- Strong password for development databaseYOUR_LIVE_DB_PASSWORD- Strong password for production databaseYOUR_DEV_NEXTAUTH_SECRET- Cryptographically secure random string for dev authYOUR_LIVE_NEXTAUTH_SECRET- Cryptographically secure random string for production authYOUR_RESEND_API_KEY- Your actual Resend API key for email deliveryyour-dev-domain.com- Your development domain nameyour-prod-domain.com- Your production domain namecontact@.com- Your organization contact email
DEV Environment
DEPLOYMENT_NAME=dev
LEARNHOUSE_DOMAIN=your-dev-domain.com
LEARNHOUSE_COOKIE_DOMAIN=your-dev-domain.com
LEARNHOUSE_CONTACT_EMAIL=contact@.com
LEARNHOUSE_EMAIL_PROVIDER=resend
LEARNHOUSE_IS_AI_ENABLED=false
LEARNHOUSE_REDIS_CONNECTION_STRING=redis://default:YOUR_DEV_REDIS_PASSWORD@redis-dev:6379/1 # Use deployment-specific Redis hostname
LEARNHOUSE_RESEND_API_KEY=YOUR_RESEND_API_KEY
LEARNHOUSE_SELF_HOSTED=true
LEARNHOUSE_SITE_DESCRIPTION=ADR LMS is platform tailored for learning experiences.
LEARNHOUSE_SITE_NAME=ADR LMS
LEARNHOUSE_SQL_CONNECTION_STRING=postgresql://learnhouse_dev:YOUR_DEV_DB_PASSWORD@db-dev:5432/learnhouse_dev # Use deployment-specific database hostname
LEARNHOUSE_SSL=true
LEARNHOUSE_SYSTEM_EMAIL_ADDRESS=contact@.com
NEXTAUTH_SECRET=YOUR_DEV_NEXTAUTH_SECRET
NEXTAUTH_URL=https://your-dev-domain.com
NEXT_PUBLIC_API_URL=https://your-dev-domain.com/api/v1/
NEXT_PUBLIC_LEARNHOUSE_API_URL=https://your-dev-domain.com/api/v1/
NEXT_PUBLIC_LEARNHOUSE_BACKEND_URL=https://your-dev-domain.com/
NEXT_PUBLIC_LEARNHOUSE_DEFAULT_ORG=default
NEXT_PUBLIC_LEARNHOUSE_DOMAIN=your-dev-domain.com
NEXT_PUBLIC_LEARNHOUSE_MULTI_ORG=false
NEXT_PUBLIC_LEARNHOUSE_TOP_DOMAIN=your-dev-domain.com
POSTGRES_DB=learnhouse_dev
POSTGRES_PASSWORD=YOUR_DEV_DB_PASSWORD
POSTGRES_USER=learnhouse_dev
REDIS_PASSWORD=YOUR_DEV_REDIS_PASSWORD
LIVE Environment
DEPLOYMENT_NAME=live
LEARNHOUSE_DOMAIN=your-prod-domain.com
LEARNHOUSE_COOKIE_DOMAIN=your-prod-domain.com
LEARNHOUSE_CONTACT_EMAIL=contact@.com
LEARNHOUSE_EMAIL_PROVIDER=resend
LEARNHOUSE_IS_AI_ENABLED=false
LEARNHOUSE_REDIS_CONNECTION_STRING=redis://default:YOUR_LIVE_REDIS_PASSWORD@redis-live:6379/0 # Use deployment-specific Redis hostname
LEARNHOUSE_RESEND_API_KEY=YOUR_RESEND_API_KEY
LEARNHOUSE_SELF_HOSTED=true
LEARNHOUSE_SITE_DESCRIPTION=ADR LMS is platform tailored for learning experiences.
LEARNHOUSE_SITE_NAME=ADR LMS
LEARNHOUSE_SQL_CONNECTION_STRING=postgresql://learnhouse:YOUR_LIVE_DB_PASSWORD@db-live:5432/learnhouse # Use deployment-specific database hostname
LEARNHOUSE_SSL=true
LEARNHOUSE_SYSTEM_EMAIL_ADDRESS=contact@.com
NEXTAUTH_SECRET=YOUR_LIVE_NEXTAUTH_SECRET
NEXTAUTH_URL=https://your-prod-domain.com
NEXT_PUBLIC_API_URL=https://your-prod-domain.com/api/v1/
NEXT_PUBLIC_LEARNHOUSE_API_URL=https://your-prod-domain.com/api/v1/
NEXT_PUBLIC_LEARNHOUSE_BACKEND_URL=https://your-prod-domain.com/
NEXT_PUBLIC_LEARNHOUSE_DEFAULT_ORG=default
NEXT_PUBLIC_LEARNHOUSE_DOMAIN=your-prod-domain.com
NEXT_PUBLIC_LEARNHOUSE_MULTI_ORG=false
NEXT_PUBLIC_LEARNHOUSE_TOP_DOMAIN=your-prod-domain.com
POSTGRES_DB=learnhouse
POSTGRES_PASSWORD=YOUR_LIVE_DB_PASSWORD
POSTGRES_USER=learnhouse
REDIS_PASSWORD=YOUR_LIVE_REDIS_PASSWORD
Key Differences for Isolation
The critical environment variables that ensure complete isolation:
- DEPLOYMENT_NAME: Different for each environment (
devvslive) - Domain Variables: Point to different domains
- Database Hostnames: Use deployment-specific hostnames (
db-devvsdb-live) - Redis Hostnames: Use deployment-specific hostnames (
redis-devvsredis-live) - Database Credentials: Different databases and users
- Redis Connection: Different Redis databases (1 vs 0)
- Secrets: Different NEXTAUTH_SECRET values
Deployment Isolation Strategy
To prevent cross-deployment contamination:
- Database Isolation: Each deployment must use its own separate database server with a unique hostname
- Redis Isolation: Each deployment must use its own Redis instance with a unique hostname
- Domain Isolation: Each deployment must use its own domain and cookie domain
- URL Patching: The Dockerfile includes runtime patching of hardcoded URLs
- Network Isolation: Each deployment should use its own Docker network
See DATABASE_ISOLATION_FIX.md for detailed implementation steps.