Internal
Public Access
- Add Dockerfile for production (multi-stage build) - Add Dockerfile.dev for development with hot reload - Add docker-compose.yml with 5 services (web, mariadb, redis, celery-worker, celery-beat) - Add docker-compose.dev.yml for development overrides - Add .dockerignore for optimized builds - Add docker/entrypoint.sh startup script - Add .env.docker.example template - Add Makefile for common commands - Add deploy.sh for one-command deployment - Update config/settings/selfhosted.py to support MariaDB via DATABASE_URL - Add mysqlclient to requirements.txt for MariaDB support - Update .gitignore to exclude .env.docker 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
130 lines
4.2 KiB
Bash
130 lines
4.2 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 (MariaDB)
|
|
# ===================================================================
|
|
|
|
DB_NAME=keepitgoing
|
|
DB_USER=keepitgoing
|
|
DB_PASSWORD=CHANGE_ME_STRONG_DATABASE_PASSWORD
|
|
DB_ROOT_PASSWORD=CHANGE_ME_STRONG_ROOT_PASSWORD
|
|
DB_HOST=mariadb
|
|
DB_PORT=3306
|
|
|
|
# ===================================================================
|
|
# 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
|
|
|
|
# ===================================================================
|
|
# 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
|