129 lines
4.7 KiB
Bash
129 lines
4.7 KiB
Bash
# BDFR Web Interface - Docker Environment Configuration
|
|
# Copy this file to .env and update the values as needed
|
|
|
|
# ============================================================================
|
|
# REDDIT OAUTH CONFIGURATION (REQUIRED for authenticated features)
|
|
# ============================================================================
|
|
# Get these credentials from: https://www.reddit.com/prefs/apps
|
|
#
|
|
# Steps to get OAuth credentials:
|
|
# 1. Go to https://www.reddit.com/prefs/apps
|
|
# 2. Click "Create App" or "Create Another App"
|
|
# 3. Fill in:
|
|
# - Name: BDFR Web Interface (or your choice)
|
|
# - App type: Select "web app"
|
|
# - Redirect URI: http://localhost:8000/auth/callback
|
|
# 4. Copy the client ID (under the app name) and client secret
|
|
|
|
BDFR_CLIENT_ID=your_client_id_here
|
|
BDFR_CLIENT_SECRET=your_client_secret_here
|
|
|
|
# IMPORTANT: This MUST match your Reddit OAuth app's redirect URI exactly
|
|
# If you change the port, update this accordingly
|
|
BDFR_REDIRECT_URI=http://localhost:8000/auth/callback
|
|
|
|
# ============================================================================
|
|
# SERVER CONFIGURATION (Optional)
|
|
# ============================================================================
|
|
|
|
# Host to bind to (0.0.0.0 for all interfaces, 127.0.0.1 for localhost only)
|
|
HOST=0.0.0.0
|
|
|
|
# Port for the web interface
|
|
PORT=8000
|
|
|
|
# Enable debug mode (true/false) - DO NOT use in production
|
|
DEBUG=false
|
|
|
|
# ============================================================================
|
|
# DOWNLOAD CONFIGURATION (Optional - Docker handles these by default)
|
|
# ============================================================================
|
|
|
|
# Directory where downloads will be stored (inside container)
|
|
# This is mounted from ./downloads on the host
|
|
BDFR_DOWNLOAD_DIR=/downloads
|
|
|
|
# Directory for application data and databases (inside container)
|
|
# This is mounted from ./data on the host
|
|
BDFR_DATA_DIR=/app/data
|
|
|
|
# ============================================================================
|
|
# BDFR ADVANCED CONFIGURATION (Optional)
|
|
# ============================================================================
|
|
|
|
# BDFR configuration directory (inside container)
|
|
# Default: /app/data/bdfr-config (stored in mounted data volume)
|
|
# BDFR_CONFIG_DIR=/app/data/bdfr-config
|
|
|
|
# Maximum wait time for rate limiting (in seconds)
|
|
# Default: 120
|
|
# BDFR_MAX_WAIT_TIME=120
|
|
|
|
# Time format for {DATE} in filenames
|
|
# Default: ISO 8601 format (%Y-%m-%dT%H:%M:%S)
|
|
# BDFR_TIME_FORMAT=%Y-%m-%dT%H:%M:%S
|
|
|
|
# File naming scheme
|
|
# Available variables: {REDDITOR}, {SUBREDDIT}, {POSTID}, {UPVOTES}, {TITLE}, {DATE}, {FLAIR}
|
|
# Default: {REDDITOR}_{TITLE}_{POSTID}
|
|
# BDFR_FILE_SCHEME={REDDITOR}_{TITLE}_{POSTID}
|
|
|
|
# Folder naming scheme
|
|
# Default: {SUBREDDIT}
|
|
# BDFR_FOLDER_SCHEME={SUBREDDIT}
|
|
|
|
# Environment variables for BDFR config location
|
|
# These tell BDFR where to store its configuration files
|
|
# APPDATA=/app/data/bdfr-config
|
|
# XDG_CONFIG_HOME=/app/data/bdfr-config
|
|
|
|
# ============================================================================
|
|
# DATABASE CONFIGURATION (Optional)
|
|
# ============================================================================
|
|
|
|
# SQLite database file paths (inside container)
|
|
# These are stored in the mounted ./data directory
|
|
# DATABASE_URL=sqlite:////app/data/scheduled_tasks.db
|
|
# SCHEDULER_DATABASE_URL=sqlite:////app/data/scheduler_jobs.db
|
|
|
|
# ============================================================================
|
|
# LOGGING CONFIGURATION (Optional)
|
|
# ============================================================================
|
|
|
|
# Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
|
|
# LOG_LEVEL=INFO
|
|
|
|
# Log file path (inside container)
|
|
# LOG_FILE=/app/logs/bdfr-web.log
|
|
|
|
# ============================================================================
|
|
# SECURITY CONFIGURATION (Production Only)
|
|
# ============================================================================
|
|
|
|
# Secret key for session management
|
|
# Generate a secure random string for production
|
|
# SECRET_KEY=your-secret-key-here
|
|
|
|
# Allowed hosts (comma-separated)
|
|
# ALLOWED_HOSTS=localhost,127.0.0.1,bdfr.example.com
|
|
|
|
# Enable CORS (true/false)
|
|
# ENABLE_CORS=true
|
|
|
|
# CORS allowed origins (comma-separated)
|
|
# CORS_ORIGINS=http://localhost:8000,https://bdfr.example.com
|
|
|
|
# ============================================================================
|
|
# NOTES
|
|
# ============================================================================
|
|
#
|
|
# - After modifying this file, restart the Docker container:
|
|
# docker-compose restart
|
|
#
|
|
# - For sensitive values in production, consider using Docker secrets:
|
|
# https://docs.docker.com/engine/swarm/secrets/
|
|
#
|
|
# - Required variables are marked as REQUIRED
|
|
# - Optional variables will use sensible defaults if not set
|
|
#
|
|
# - For more information, see DOCKER.md |