Files
dotcom-arcade/backend/.env.example
T

138 lines
5.2 KiB
Bash

# =============================================================================
# Flashpoint Web App - Environment Configuration
# =============================================================================
# Copy this file to .env and configure for your environment
#
# For Docker deployment:
# - Use /data/flashpoint paths (mounted from host)
# - Set FLASHPOINT_HOST_PATH in docker-compose.yml
#
# For local development:
# - Use your actual Flashpoint installation path (e.g., D:/Flashpoint)
# =============================================================================
# -----------------------------------------------------------------------------
# Server Configuration
# -----------------------------------------------------------------------------
NODE_ENV=development
PORT=3100
HOST=0.0.0.0
# -----------------------------------------------------------------------------
# Flashpoint Paths
# -----------------------------------------------------------------------------
# Base path to Flashpoint installation
# All other paths are automatically derived from this (Data/, Legacy/, etc.)
# Docker: /data/flashpoint (mounted from host)
# Local: D:/Flashpoint or /path/to/flashpoint
FLASHPOINT_PATH=D:/Flashpoint
# -----------------------------------------------------------------------------
# Game Service URLs (Separate Service)
# -----------------------------------------------------------------------------
# NOTE: Game proxy functionality has been moved to a separate game-service
# The backend now proxies requests to the game-service instead of serving them directly
# URL to game-service proxy server (default: http://localhost:22500)
GAME_SERVICE_PROXY_URL=http://localhost:22500
# URL to game-service GameZip server (default: http://localhost:22501)
GAME_SERVICE_GAMEZIP_URL=http://localhost:22501
# Backward compatibility
GAME_SERVER_URL=http://localhost:22500
GAME_SERVER_HTTP_PORT=22501
# External image CDN URLs (comma-separated)
# Used for image fallback when not found locally
EXTERNAL_IMAGE_URLS=https://infinity.flashpointarchive.org/Flashpoint/Data/Images,https://infinity.unstable.life/Flashpoint/Data/Images
# -----------------------------------------------------------------------------
# Redis Cache (Optional)
# -----------------------------------------------------------------------------
# Enable Redis for caching (requires Redis server)
REDIS_ENABLED=false
# Redis server host
REDIS_HOST=localhost
# Redis server port
REDIS_PORT=6379
# -----------------------------------------------------------------------------
# Authentication & Security
# -----------------------------------------------------------------------------
# JWT secret key for signing tokens
# CRITICAL: MUST be changed in production!
# Generate with: openssl rand -hex 64
JWT_SECRET=INSECURE-CHANGE-THIS-IN-PRODUCTION
# JWT token expiration (default: 1h)
# Examples: 15m, 1h, 7d
JWT_EXPIRES_IN=1h
# Bcrypt salt rounds for password hashing (default: 10)
# Higher = more secure but slower (recommended: 10-12)
BCRYPT_SALT_ROUNDS=10
# User database path (SQLite file)
USER_DB_PATH=./user.db
# -----------------------------------------------------------------------------
# Domain Configuration
# -----------------------------------------------------------------------------
# Frontend domain (used for CORS and share URL generation)
# Development: http://localhost:5173 (Vite dev server)
# Production: http://localhost or your domain
DOMAIN=http://localhost:5173
# -----------------------------------------------------------------------------
# Rate Limiting
# -----------------------------------------------------------------------------
# Time window for rate limiting (in milliseconds)
RATE_LIMIT_WINDOW_MS=60000
# Maximum requests per time window
RATE_LIMIT_MAX_REQUESTS=100
# -----------------------------------------------------------------------------
# Logging
# -----------------------------------------------------------------------------
# Log level: error, warn, info, debug
LOG_LEVEL=info
# -----------------------------------------------------------------------------
# Home Page Configuration
# -----------------------------------------------------------------------------
# Time window (in hours) for "Recently Added" and "Recently Updated" sections
# Default: 24 hours
HOME_RECENT_HOURS=24
# -----------------------------------------------------------------------------
# OpenTelemetry (Optional - for observability and monitoring)
# -----------------------------------------------------------------------------
# Enable/disable OpenTelemetry telemetry collection
# Compatible with: Jaeger, Prometheus, Grafana Cloud, New Relic, Datadog, etc.
OTEL_ENABLED=false
# OTLP endpoint URL (HTTP protocol)
# Examples:
# - Local Jaeger: http://localhost:4318
# - Grafana Cloud: https://otlp-gateway-prod-us-central-0.grafana.net/otlp
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
# Service name for identifying this service in traces/metrics
OTEL_SERVICE_NAME=flashpoint-web-backend
# Enable/disable distributed tracing
OTEL_TRACES_ENABLED=true
# Enable/disable metrics collection
OTEL_METRICS_ENABLED=true
# Metrics export interval in milliseconds (default: 60000 = 1 minute)
OTEL_METRICS_EXPORT_INTERVAL=60000
# OpenTelemetry log level (error, warn, info, debug)
OTEL_LOG_LEVEL=info