Files
Keith SmithandClaude Sonnet 4.5 0459ab7456 Update docker-compose.yml with all environment variables and PostgreSQL
Major changes:
- Switch from MariaDB to PostgreSQL 16
- Add all required environment variables to web service:
  - SECRET_KEY, DEBUG, ALLOWED_HOSTS
  - CSRF_TRUSTED_ORIGINS, CORS_ALLOWED_ORIGINS
  - Email configuration (HOST, PORT, USER, PASSWORD, TLS)
  - Gunicorn settings (WORKERS, TIMEOUT)
- Add SECRET_KEY to celery services (required for Django)
- Update all services to depend on 'postgres' instead of 'mariadb'
- Update DATABASE_URL to use PostgreSQL format
- Update .env.docker.example to reflect PostgreSQL and add WEB_PORT

All environment variables now properly declared in compose file
with ${VAR} syntax for Portainer/Docker compatibility.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 17:13:12 -07:00

135 lines
4.4 KiB
Bash

# ===================================================================
# KeepItGoing Server - Docker Environment Configuration
# ===================================================================
# Copy this file to .env.docker and fill in your values
# DO NOT commit .env.docker to version control!
# ===================================================================
# Django Core Settings
# ===================================================================
# SECURITY WARNING: Generate a strong secret key!
# Generate with: python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
SECRET_KEY=CHANGE_ME_GENERATE_A_STRONG_SECRET_KEY_50_PLUS_CHARACTERS
# Debug mode (MUST be False in production)
DEBUG=False
# Comma-separated list of allowed hosts
# Example: api.yourdomain.com,localhost
ALLOWED_HOSTS=yourdomain.com,localhost
# Comma-separated list of trusted origins for CSRF (must include https://)
# Example: https://api.yourdomain.com,https://yourdomain.com
CSRF_TRUSTED_ORIGINS=https://yourdomain.com
# Domain used in email links
SITE_DOMAIN=yourdomain.com
# ===================================================================
# Database Configuration (PostgreSQL)
# ===================================================================
DB_NAME=keepitgoing
DB_USER=keepitgoing
DB_PASSWORD=CHANGE_ME_STRONG_DATABASE_PASSWORD
# ===================================================================
# Redis Configuration
# ===================================================================
REDIS_URL=redis://redis:6379/0
# ===================================================================
# Email Configuration
# ===================================================================
# Required for user registration (email verification)
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
# Gmail Example (use App Password, not regular password):
# EMAIL_HOST=smtp.gmail.com
# EMAIL_PORT=587
# EMAIL_USE_TLS=True
# EMAIL_HOST_USER=your-email@gmail.com
# EMAIL_HOST_PASSWORD=your-app-password
# SendGrid Example:
# EMAIL_HOST=smtp.sendgrid.net
# EMAIL_PORT=587
# EMAIL_USE_TLS=True
# EMAIL_HOST_USER=apikey
# EMAIL_HOST_PASSWORD=your-sendgrid-api-key
# AWS SES Example:
# EMAIL_HOST=email-smtp.us-east-1.amazonaws.com
# EMAIL_PORT=587
# EMAIL_USE_TLS=True
# EMAIL_HOST_USER=your-aws-access-key
# EMAIL_HOST_PASSWORD=your-aws-secret-key
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
DEFAULT_FROM_EMAIL=KeepItGoing <noreply@yourdomain.com>
SERVER_EMAIL=server@yourdomain.com
# ===================================================================
# Email Verification Settings
# ===================================================================
EMAIL_VERIFICATION_TOKEN_EXPIRY_HOURS=24
# ===================================================================
# CORS Configuration
# ===================================================================
# Comma-separated list of allowed origins
# Example: https://yourdomain.com,https://app.yourdomain.com
CORS_ALLOWED_ORIGINS=https://yourdomain.com
# ===================================================================
# SaaS Mode
# ===================================================================
# Set to True for SaaS deployment with billing/usage limits
# Set to False for self-hosted deployment (no limits)
SAAS_MODE=False
# ===================================================================
# Web Server Configuration
# ===================================================================
# Port to expose the web service on (default: 8000)
# Change this if port 8000 is already in use
WEB_PORT=8000
# ===================================================================
# Gunicorn Configuration
# ===================================================================
GUNICORN_WORKERS=3
GUNICORN_TIMEOUT=60
# ===================================================================
# Push Notifications (Optional)
# ===================================================================
# Leave empty if not using push notifications
# Firebase Cloud Messaging (FCM)
FCM_CREDENTIALS_PATH=
# Web Push (VAPID keys)
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=
VAPID_ADMIN_EMAIL=
# ===================================================================
# Additional Settings
# ===================================================================
# Django settings module (usually don't need to change)
DJANGO_SETTINGS_MODULE=config.settings.selfhosted