CI / check (push) Successful in 37s
CI / tests-ui (push) Failing after 42s
CI / tests-imaging-browsers (push) Successful in 1m23s
CI / tests-integration (push) Successful in 2m15s
CI / tests-unit (push) Successful in 2m19s
CI / preflight (push) Skipped
CI / deploy (push) Skipped
Document that CAPTCHA_PROVIDER accepts a provider name (e.g. turnstile) and spell out that the site key is public while the secret must stay on the host / in CI and never be committed.
159 lines
5.9 KiB
Bash
159 lines
5.9 KiB
Bash
# ==============================================================================
|
|
# Epicnextcms — Ultimate Speed & Low-Latency Example Configuration
|
|
# ==============================================================================
|
|
|
|
# --- DATABASE (High Performance Pooling & Strict Timeouts) ---
|
|
DATABASE_URL="mysql://user:password@localhost:3306/dbname?charset=utf8mb4&connection_limit=150&connect_timeout=5"
|
|
DATABASE_POOL_SIZE=150
|
|
DATABASE_IDLE_TIMEOUT_MS=60000
|
|
DATABASE_CONNECT_TIMEOUT_MS=5000
|
|
|
|
# --- REDIS (Lightning Fast Caching & Sessions) ---
|
|
REDIS_URL=redis://127.0.0.1:6379?connect_timeout=2
|
|
REDIS_CACHE_TTL_DEFAULT=7200
|
|
# In-process cache entries kept per instance, evicted least-recently-used. Raise
|
|
# it if hot keys are evicted while memory headroom remains (default 2000).
|
|
CACHE_MEMORY_MAX_ENTRIES=2000
|
|
# Renders kept per imaging cache directory, counted as .img/.json pairs. A sweep
|
|
# every 5 minutes brings an over-budget directory back to 90% of this (default 20000).
|
|
IMAGING_CACHE_MAX_ENTRIES=20000
|
|
|
|
# --- CACHE TTL TUNING (seconds; defaults apply when unset) ---
|
|
# Higher = less DB load but staler data. Publishing news rotates its cache
|
|
# revision immediately, so news TTLs only delay content that bypasses that path.
|
|
CMS_HOME_PAYLOAD_TTL_SEC=15
|
|
CMS_NEWS_LIST_TTL_SEC=300
|
|
CMS_NEWS_ARCHIVE_TTL_SEC=60
|
|
CMS_SEARCH_TTL_SEC=30
|
|
CMS_ONLINE_COUNT_TTL_SEC=10
|
|
CMS_COUNTERS_TTL_SEC=300
|
|
CMS_SITE_SETTINGS_TTL_SEC=300
|
|
CMS_SITE_SETTINGS_MEMORY_TTL_SEC=60
|
|
# Boot-time cache warm-up (primes hot keys after each deploy). Set false on
|
|
# tiny hosts where the boot COUNT(*) burst is undesirable.
|
|
CMS_WARMUP_ENABLED=true
|
|
|
|
# --- CORE RUNTIME & PERFORMANCE FLAGS ---
|
|
NODE_ENV=production
|
|
PORT=3002
|
|
NEXT_TELEMETRY_DISABLED=1
|
|
UV_THREADPOOL_SIZE=16
|
|
# Production requires this kill switch plus housekeeping.preview.access.
|
|
HOUSEKEEPING_NEXT_PREVIEW_ENABLED=false
|
|
|
|
# --- HOTEL & URLS ---
|
|
HOTEL_NAME=EPIC WEB CONTROL
|
|
APP_URL=http://localhost:3002
|
|
AUTH_URL=http://localhost:3002
|
|
|
|
# --- IMAGER ---
|
|
# Avatar imager: Polaris-imager (avatar-imaging-pixinode) serves /avatarimage on 8082.
|
|
IMAGING_UPSTREAM_URL=http://127.0.0.1:8082/avatarimage
|
|
# Runtime values: changing these only requires recreating the container.
|
|
IMAGER_URL=http://127.0.0.1:8082/avatarimage
|
|
BADGE_URL=/swf/c_images/album1584
|
|
# Legacy NEXT_PUBLIC_IMAGER_URL / NEXT_PUBLIC_BADGE_URL are still read at runtime.
|
|
|
|
# --- SECURITY & HASHING ---
|
|
AUTH_SECRET=your-super-secret-auth-key-change-this-min-32-chars
|
|
APP_KEY=base64:your-app-key-here=
|
|
# Bcrypt cost factor for new password hashes.
|
|
BCRYPT_COST=12
|
|
|
|
# --- ANTI-DDOS (app-layer gate, production only) ---
|
|
# On by default in production. Set to "false" to disable (not recommended).
|
|
ANTI_DDOS_ENABLED=true
|
|
# Per-category request thresholds over the given window (per client IP).
|
|
ANTI_DDOS_PAGES_LIMIT=300
|
|
ANTI_DDOS_PAGES_WINDOW_SEC=60
|
|
ANTI_DDOS_API_LIMIT=600
|
|
ANTI_DDOS_API_WINDOW_SEC=60
|
|
ANTI_DDOS_AUTH_LIMIT=20
|
|
ANTI_DDOS_AUTH_WINDOW_SEC=60
|
|
# Whole-site safety valve per window (sheds everything for global_halt_ms when hit).
|
|
ANTI_DDOS_GLOBAL_LIMIT=18000
|
|
ANTI_DDOS_GLOBAL_WINDOW_SEC=60
|
|
ANTI_DDOS_GLOBAL_HALT_MS=10000
|
|
# Violations accumulate inside this window before an IP is hard-blocked.
|
|
ANTI_DDOS_VIOLATION_WINDOW_SEC=600
|
|
ANTI_DDOS_MAX_VIOLATIONS=10
|
|
# Escalation tiers "minViolations:ttlSeconds" — how long an offender stays blocked.
|
|
ANTI_DDOS_BLOCK_TIERS=5:600,20:3600,50:86400
|
|
|
|
# --- CLOUDFLARE API (automatic edge blocks, optional) ---
|
|
# When set, the anti-DDoS gate automatically mirrors hard-blocked IPs to the
|
|
# zone's IP Access Rules so repeat offenders are dropped at the Cloudflare
|
|
# edge (works on every plan, incl. Free). Token permissions required:
|
|
# Zone > Zone > Read and Zone > Firewall > Edit
|
|
CLOUDFLARE_API_TOKEN=
|
|
CLOUDFLARE_ZONE_ID=
|
|
# Runtime toggle; leave true to auto-create Cloudflare blocks at the block
|
|
# threshold. Also overridable live from the admin panel.
|
|
CLOUDFLARE_AUTO_BLOCK_ENABLED=true
|
|
# Override for tests/staging (production uses the public endpoint by default).
|
|
CLOUDFLARE_API_BASE_URL=https://api.cloudflare.com/client/v4
|
|
|
|
# --- CAPTCHA (env fallback; admin settings win when set) ---
|
|
# Enable a captcha on register/login/forgot/resend without touching the DB.
|
|
# "none" (default), "turnstile", "recaptcha" or "hcaptcha". Example:
|
|
# CAPTCHA_PROVIDER=turnstile
|
|
CAPTCHA_PROVIDER=
|
|
# Provider keys. The SITE key is public (it ships to every browser), the
|
|
# SECRET is server-only and must never be committed — set it on the host or as
|
|
# a masked CI/CD variable. Cloudflare Turnstile keys:
|
|
# https://dash.cloudflare.com/turnstile
|
|
TURNSTILE_SITE_KEY=
|
|
TURNSTILE_SECRET_KEY=
|
|
|
|
# --- PATHS ---
|
|
BADGE_UPLOAD_DIR=./public/assets/images/badges
|
|
EMULATOR_JAR_PATH=./emulator/Arcturus.jar
|
|
EMULATOR_BACKUP_DIR=./backups/emulator
|
|
EMULATOR_BACKUP_KEEP=7
|
|
# Optional mysqldump (jobs-worker daily 03:30). Requires mysqldump on PATH.
|
|
DB_BACKUP_DIR=
|
|
DB_BACKUP_KEEP=7
|
|
# Minutes between repeat health-fail alerts from jobs-worker (default 15).
|
|
HEALTH_ALERT_COOLDOWN_MIN=15
|
|
|
|
# --- FURNITURE ASSETS ---
|
|
# Extension the local Nitro client requests for furniture bundles. The CMS
|
|
# writes new/imported/repaired bundles with this extension and prefers it when
|
|
# resolving existing ones (the other stays readable as a legacy fallback).
|
|
# ".hab" (default) or ".nitro".
|
|
FURNI_BUNDLE_EXT=.hab
|
|
|
|
# --- RCON (Low Latency Loop) ---
|
|
RCON_HOST=127.0.0.1
|
|
RCON_PORT=3003
|
|
EMU_PORT=3004
|
|
RCON_TIMEOUT_MS=2000
|
|
|
|
# --- EMAIL & NOTIFICATIONS ---
|
|
SMTP_HOST=
|
|
SMTP_PORT=587
|
|
SMTP_USER=
|
|
SMTP_PASSWORD=
|
|
SMTP_FROM=[email protected]
|
|
|
|
# --- ALERTING & MONITORING ---
|
|
DISCORD_WEBHOOK_URL=
|
|
ALERT_EMAIL=
|
|
|
|
# --- MODERATION & PAYMENTS ---
|
|
OPENAI_API_KEY=
|
|
PAYPAL_CLIENT_ID=
|
|
PAYPAL_SECRET=
|
|
PAYPAL_API=https://api-m.sandbox.paypal.com
|
|
|
|
# --- LOGGING ---
|
|
LOG_LEVEL=error
|
|
|
|
# --- BYPARR (Cloudflare bypass for clone sources) ---
|
|
BYPARR_URL=http://localhost:8191
|
|
|
|
# Catalog Studio export: dedicated clean clone on Beta-3 with Git push credentials.
|
|
CATALOG_GIT_CHECKOUT=
|
|
# Persistent directory shared by CMS and worker, outside the catalog clone.
|
|
CATALOG_GIT_STATE_DIR=
|