156 lines
5.4 KiB
Bash
156 lines
5.4 KiB
Bash
# =============================================================================
|
|
# Flashpoint Web - Docker Compose Environment Configuration
|
|
# =============================================================================
|
|
#
|
|
# This file contains all configurable environment variables for Docker Compose.
|
|
# Copy this file to `.env` and modify the values as needed.
|
|
#
|
|
# Usage:
|
|
# cp .env.example .env
|
|
# # Edit .env with your values
|
|
# docker-compose up -d
|
|
#
|
|
# =============================================================================
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# REQUIRED VARIABLES (Must be set)
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Path to your Flashpoint installation
|
|
# Example: /mnt/flashpoint, D:/Flashpoint, /data/flashpoint
|
|
FLASHPOINT_HOST_PATH=/path/to/flashpoint
|
|
|
|
# JWT secret for authentication (REQUIRED for security)
|
|
# Generate with: openssl rand -base64 32
|
|
# IMPORTANT: MUST be changed in production!
|
|
JWT_SECRET=change-this-to-a-secure-random-string
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# APPLICATION SETTINGS
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Node environment (development, production)
|
|
# Default: production
|
|
NODE_ENV=production
|
|
|
|
# Timezone for all containers (e.g., UTC, America/New_York, Europe/London)
|
|
# Default: UTC
|
|
TZ=UTC
|
|
|
|
# Log level (error, warn, info, debug)
|
|
# Default: info
|
|
LOG_LEVEL=info
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# PORT CONFIGURATION
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Frontend web interface port (host port)
|
|
# Default: 80
|
|
WEB_PORT=80
|
|
|
|
# Backend API port (host port)
|
|
# Default: 3100
|
|
API_PORT=3100
|
|
|
|
# Game proxy server port (host port)
|
|
# Default: 22500
|
|
PROXY_PORT=22500
|
|
|
|
# GameZip server port (host port)
|
|
# Default: 22501
|
|
GAMEZIP_PORT=22501
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# DOMAIN CONFIGURATION
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Frontend domain (used for CORS and share URL generation)
|
|
# Development: http://localhost:80
|
|
# Production: https://yourdomain.com
|
|
# Default: http://localhost:80
|
|
DOMAIN=http://localhost:80
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# EXTERNAL SERVICES
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# External image CDN URLs (comma-separated) - Backend only
|
|
# Used for image fallback when local images not found
|
|
# Default: https://infinity.flashpointarchive.org/Flashpoint/Data/Images,https://infinity.unstable.life/Flashpoint/Data/Images
|
|
EXTERNAL_IMAGE_URLS=https://infinity.flashpointarchive.org/Flashpoint/Data/Images,https://infinity.unstable.life/Flashpoint/Data/Images
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# ADVANCED BACKEND SETTINGS (Optional)
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Redis caching (disabled by default)
|
|
# REDIS_ENABLED=false
|
|
# REDIS_HOST=localhost
|
|
# REDIS_PORT=6379
|
|
|
|
# Rate limiting
|
|
# RATE_LIMIT_WINDOW_MS=60000
|
|
# RATE_LIMIT_MAX_REQUESTS=100
|
|
|
|
# JWT configuration
|
|
# JWT_EXPIRES_IN=1h
|
|
|
|
# Password hashing
|
|
# BCRYPT_SALT_ROUNDS=10
|
|
|
|
# Home page recent games timeframe (hours)
|
|
# HOME_RECENT_HOURS=24
|
|
|
|
# User database path (Docker default: /app/data/user.db)
|
|
# USER_DB_PATH=/app/data/user.db
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# NOTES
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# 1. FLASHPOINT_HOST_PATH and JWT_SECRET are REQUIRED
|
|
# - The Docker Compose will fail to start without these variables
|
|
#
|
|
# 2. Flashpoint Path Configuration
|
|
# - FLASHPOINT_HOST_PATH: Your local Flashpoint installation directory
|
|
# - All subdirectories (Data/, Legacy/, etc.) are auto-discovered
|
|
# - Do NOT set individual path variables (they are ignored)
|
|
#
|
|
# 3. Port Configuration
|
|
# - WEB_PORT: External port for accessing the web UI
|
|
# - API_PORT: External port for API access (usually accessed via web UI)
|
|
# - PROXY_PORT: Game proxy server (accessed by games)
|
|
# - GAMEZIP_PORT: ZIP server (accessed by games)
|
|
#
|
|
# 4. Security Best Practices
|
|
# - ALWAYS change JWT_SECRET in production
|
|
# - Use HTTPS in production (configure reverse proxy)
|
|
# - Set CORS_ORIGIN to your actual domain in production
|
|
# - Use strong, unique JWT secrets (32+ characters)
|
|
#
|
|
# 5. Production Deployment
|
|
# - Use docker-compose.prod.yml for production
|
|
# - Set NODE_ENV=production
|
|
# - Configure proper CORS_ORIGIN
|
|
# - Use secure JWT_SECRET
|
|
# - Consider using environment-specific .env files:
|
|
# - .env.development
|
|
# - .env.production
|
|
#
|
|
# 6. Timezone Configuration
|
|
# - TZ affects log timestamps and date handling
|
|
# - Common values: UTC, America/New_York, Europe/London, Asia/Tokyo
|
|
# - List available timezones: timedatectl list-timezones
|
|
#
|
|
# 7. Breaking Changes from Previous Versions
|
|
# - CORS_ORIGIN renamed to DOMAIN (update your .env files)
|
|
#
|
|
# 8. Variables That Don't Work (Don't Set These)
|
|
# - ALLOW_CROSS_DOMAIN: Hardcoded to true in game-service
|
|
# - EXTERNAL_FALLBACK_URLS: Game service reads from proxySettings.json
|
|
# - FLASHPOINT_*_PATH (individual paths): Auto-derived from FLASHPOINT_PATH
|
|
# - CORS_ORIGIN: Removed - use DOMAIN instead
|
|
#
|
|
# =============================================================================
|