Files
dotcom-arcade/backend/.env.example
T
Darkraise bd2514f1f7 chore(config): centralize and document environment variables
- Read game paths and NODE_ENV through the config module in
  gamezipserver instead of process.env directly
- Harden SQLite cache/mmap parsing with isNaN checks so invalid
  values fall back to defaults instead of NaN
- Pass auth, rate-limit, application, and OpenTelemetry variables
  through both docker-compose files with documented defaults
- Expand env var documentation and .env examples to match
2026-08-11 16:02:06 +07:00

42 lines
1.1 KiB
Bash

# Backend Environment Template (Local Development)
# Copy to .env and fill in required values.
# Required
FLASHPOINT_PATH=D:/Flashpoint
JWT_SECRET=replace-with-a-secure-random-string
# Optional settings
NODE_ENV=development
LOG_LEVEL=info
DOMAIN=http://localhost:5173
# Rate limiting
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX_REQUESTS=100
# Auth
JWT_EXPIRES_IN=1h
BCRYPT_SALT_ROUNDS=10
# Game content serving
# ENABLE_CGI=false
# Misc
HOME_RECENT_HOURS=24
# ---------------------------------------------------------------------------
# Database Performance Optimization (for network storage)
# ---------------------------------------------------------------------------
# Enable if FLASHPOINT_PATH is on a network share (SMB/NFS)
# Copies flashpoint.sqlite to local storage for faster access
ENABLE_LOCAL_DB_COPY=false
# SQLite performance tuning
# SQLITE_CACHE_SIZE: Negative value = KB, -64000 = 64MB cache
SQLITE_CACHE_SIZE=-64000
# SQLITE_MMAP_SIZE: Memory-mapped I/O size in bytes (256MB default)
SQLITE_MMAP_SIZE=268435456
# Cache pre-warming (loads common queries on startup)
ENABLE_CACHE_PREWARM=true