# Dawarich Docker Compose Configuration # Copy this file to .env and customize for your environment # ============================================================================= # ENVIRONMENT CONFIGURATION # ============================================================================= # Rails environment: development, staging, or production RAILS_ENV=development # ============================================================================= # DATABASE CONFIGURATION # ============================================================================= # PostgreSQL credentials POSTGRES_USER=postgres POSTGRES_PASSWORD=password # Database name - will default to dawarich_${RAILS_ENV} # For development: dawarich_development # For staging: dawarich_staging # For production: dawarich_production POSTGRES_DB=dawarich_development # Database connection settings (used by Rails app) DATABASE_HOST=dawarich_db DATABASE_PORT=5432 DATABASE_USERNAME=postgres DATABASE_PASSWORD=password DATABASE_NAME=dawarich_development # ============================================================================= # REDIS CONFIGURATION # ============================================================================= # Redis connection URL REDIS_URL=redis://dawarich_redis:6379 # ============================================================================= # APPLICATION SETTINGS # ============================================================================= # Port to expose the application on DAWARICH_APP_PORT=3000 # Application hosts (comma-separated) # Development: localhost # Production: your-domain.com,www.your-domain.com APPLICATION_HOSTS=localhost,::1,127.0.0.1 # Application protocol (http or https) APPLICATION_PROTOCOL=http # Time zone TIME_ZONE=Europe/London # Minimum minutes spent in city for statistics MIN_MINUTES_SPENT_IN_CITY=60 # Self-hosted flag (true for docker deployments) SELF_HOSTED=true # Store geodata (reverse geocoding results) STORE_GEODATA=true # ============================================================================= # SECURITY # ============================================================================= # Secret key base for production/staging # Generate with: openssl rand -hex 64 # Leave empty for development (will auto-generate) SECRET_KEY_BASE= # ============================================================================= # BACKGROUND JOBS # ============================================================================= # Sidekiq concurrency (number of threads) BACKGROUND_PROCESSING_CONCURRENCY=10 # ============================================================================= # MONITORING & LOGGING # ============================================================================= # Prometheus exporter settings PROMETHEUS_EXPORTER_ENABLED=false PROMETHEUS_EXPORTER_HOST=0.0.0.0 PROMETHEUS_EXPORTER_PORT=9394 PROMETHEUS_EXPORTER_HOST_SIDEKIQ=dawarich_app # Uncomment to expose Prometheus port # PROMETHEUS_PORT=9394 # Rails logging RAILS_LOG_TO_STDOUT=true # Docker logging settings LOG_MAX_SIZE=100m LOG_MAX_FILE=5 # ============================================================================= # RESOURCE LIMITS # ============================================================================= # CPU and memory limits for the app container APP_CPU_LIMIT=0.50 APP_MEMORY_LIMIT=4G # ============================================================================= # EXAMPLE CONFIGURATIONS BY ENVIRONMENT # ============================================================================= # --- DEVELOPMENT --- # RAILS_ENV=development # POSTGRES_DB=dawarich_development # DATABASE_NAME=dawarich_development # APPLICATION_HOSTS=localhost,::1,127.0.0.1 # APPLICATION_PROTOCOL=http # SECRET_KEY_BASE= # SELF_HOSTED=true # --- STAGING --- # RAILS_ENV=staging # POSTGRES_DB=dawarich_staging # DATABASE_NAME=dawarich_staging # APPLICATION_HOSTS=staging.example.com # APPLICATION_PROTOCOL=https # SECRET_KEY_BASE=your-generated-secret-key # SELF_HOSTED=true # --- PRODUCTION --- # RAILS_ENV=production # POSTGRES_DB=dawarich_production # DATABASE_NAME=dawarich_production # APPLICATION_HOSTS=dawarich.example.com,www.dawarich.example.com # APPLICATION_PROTOCOL=https # SECRET_KEY_BASE=your-generated-secret-key # SELF_HOSTED=true # PROMETHEUS_EXPORTER_ENABLED=true