CompCubeCompCubeWiki
Developers

Environment configuration

Copy each repository's .env.example to .env. Git ignores .env; protect it with owner-only permissions and never prefix secrets with PUBLIC_.

Backend

VariablePurpose / default
PGCONNECTSTRINGPostgreSQL URI. Compose overrides host to postgres.
POSTGRES_DB/USER/PASSWORDCompose database bootstrap; use a strong production password.
BK_CLIENT_ID, BK_CLIENT_SECRETBeatKhana OAuth application credentials. Required for OAuth.
BK_CALLBACK_URLExact registered callback, default http://localhost:7198/oauth/callback.
BK_API_URL, BK_AUTHORIZE_URL, BK_PUBLIC_KEY_URLBeatKhana API/OAuth/key endpoints.
BK_LINKING_URLPlayer identity-linking page.
PUBLIC_API_URLPublic backend origin used in generated download links and logs.
WEBSITE_URLBrowser redirect origin after OAuth.
CORS_ORIGINAllowed website origin.
AUTH_COOKIE_DOMAINUse .compcube.net for API/site subdomains; blank locally.
BEATLEADER_API_URL, SCORESABER_API_URL, BEATSAVER_API_URL, BEATSAVER_FALLBACK_API_URLExternal identity/map services.
PLUGIN_VERSIONSComma-separated accepted plugin versions. Blank accepts development builds/falls back to published versions for status. Pin production.
PLUGIN_RELEASE_DIRECTORYPersistent DLL/manifest storage. Compose uses /data/plugin-releases.
PLUGIN_UPLOAD_SECRETLong bearer secret shared only with GitHub Actions. The plugin workflow uses it only when the workflow ref is exactly main; other builds stay in GitHub Actions artifacts.
PLUGIN_UPLOAD_MAX_BYTESRaw DLL limit, default 25 MiB.
DISCORD_TOKEN, DISCORD_CLIENT_ID, DISCORD_GUILD_IDOptional bot; blank token disables it.
REST_PORT, WS_PORTDefault 7198 and 8008.
TIMER_POLL_MS, TIMER_LEASE_MSDefault 1000 and 30000 ms.
DISCARD_SECONDS, PICK_SECONDS, ROUND_RESULTS_SECONDSDefaults: 60-second discard, 45-second pick, and 6-second results display. ROUND_RESULTS_SECONDS must match the plugin's RoundResultsDurationSeconds; mismatched plugins are rejected.
TRUST_PROXYExpress trusted proxy ranges; default private/loopback ranges.

Website

PUBLIC_COMPCUBE_API_URL, PUBLIC_COMPCUBE_SOCKET_URL, PUBLIC_REPLAY_VIEWER_URL, PUBLIC_SITE_URL, PUBLIC_DISCORD_URL, and PUBLIC_GITHUB_URL are browser-visible. COMPCUBE_INTERNAL_API_URL is a private server-side route to the backend. In production it may be the public API origin or a private reverse-proxy/container address reachable from the website container.

Wiki

NEXT_PUBLIC_WEBSITE_URL controls the CompCube navigation link. WIKI_PORT controls the published Compose port (default 3001). No secret is required.

On this page