1
0
Fork 0
polaris-task-force/.env.example

124 lines
5.9 KiB
Text

# --- Database (PostgreSQL) ---
# Coolify: leave this BLANK in the application's env here — Coolify injects
# DATABASE_URI automatically from the per-environment PostgreSQL service
# (Project → New Resource → PostgreSQL). Use the format Coolify emits.
# Local docker compose: override via POSTGRES_USER/_PASSWORD/_DB in your
# local `.env` (the compose file rewrites DATABASE_URI from those).
DATABASE_URI=postgres://ptfapp:polaristaskforcedb@127.0.0.1:5432/ptf-app-dev
# Random 32+ char secret used to sign Payload sessions / JWTs.
# Generate with: `openssl rand -hex 16`
PAYLOAD_SECRET=YOUR_SECRET_HERE
# --- Public URL of the running app ---
# Used by the game-tick script (POST /api/game-tick/notify) and by Payload
# for absolute admin URLs. In Coolify set this to your environment's
# public domain (e.g. https://dev.ptf.example.com).
APP_URL=http://localhost:3000
# --- Game tick notify secret ---
# Shared secret that guards the /api/game-tick/notify endpoint. Generate
# the same value here and pass it to the scheduled `docker exec` job on
# Coolify (or to your cron). See DEPLOYMENT.md.
GAME_TICK_NOTIFY_SECRET=YOUR_GAME_TICK_NOTIFY_SECRET
# --- Unsloth AI (Payload AI Compose plugin) ---
# Base URL of the Unsloth Studio OpenAI-compatible API that serves the
# Ornith 9B model (the "Apex" connection lives on the apex-lnx machine).
# Defaults to the Apex box's LAN address; for the deployed site use whatever
# host can actually reach that box (VPN / tunnel / reverse proxy).
UNSLOTH_URL=http://192.168.1.7:8888/v1
# sk-unsloth-... API key generated in Unsloth Studio (Settings -> API).
UNSLOTH_API_KEY=YOUR_UNSLOTH_API_KEY
# Model id served by the Unsloth connection (the GGUF name its API reports).
UNSLOTH_MODEL=unsloth/Ornith-1.0-9B-GGUF
# Optional label for the model in the Compose UI; derived from UNSLOTH_MODEL when omitted.
# UNSLOTH_MODEL_NAME=Ornith 1.0 9B
# --- Bin script file logging ---
# Optional. Payload bin scripts (game-tick, market-tick, mission-tick,
# generate-mission) tee their logs to daily files. Defaults to <repo>/logs
# (inside containers: /app/logs — mount a persistent volume or point this at
# a persisted path, e.g. /app/media/logs, to keep them across restarts).
# BIN_LOG_DIR=
# --- Payload email (nodemailer / SMTP relay) ---
# Optional. Leave blank to disable outbound email (password resets, etc).
EMAIL_FROM_ADDRESS=
EMAIL_FROM_NAME=
EMAIL_HOST=
EMAIL_PORT=587
EMAIL_USERNAME=
EMAIL_PASSWORD=
# --- Docker compose tunables (local dev only — not used by Coolify) ---
POSTGRES_USER=ptfapp
POSTGRES_PASSWORD=polaristaskforcedb
POSTGRES_DB=ptf-app-dev
POSTGRES_PORT=5432
APP_PORT=3000
# --- Discord bot (presence-gated) ---
# The bot ships inside the Docker image but starts ONLY when DISCORD_TOKEN is
# set in the environment (Coolify per-env gate — set it in prod only; leave
# unset in dev/stage). DISCORD_GUILD_ID is REQUIRED whenever the token is set
# (the bot config throws at import if it's missing). All other DISCORD_* vars
# are optional.
# DISCORD_TOKEN=
# DISCORD_GUILD_ID=
# Roll call: mission attendance embeds and roll-call posts go here (ops channel).
# DISCORD_OPS_CHANNEL_ID=
# Modlists: new/changed mission modlists and the 8-hour pre-op modlist buffer
# post here. Unset falls back to DISCORD_OPS_CHANNEL_ID.
# DISCORD_MODLIST_CHANNEL_ID=
# App updates: where /announce posts when no channel is given; also the
# channel preselected in the /announce compose dialog.
# DISCORD_ANNOUNCE_CHANNEL_ID=
# Optional: when set, /announce (no message, compose dialog) automatically
# mentions this role in the posted announcement. Leave unset to disable.
# DISCORD_ANNOUNCE_MENTION_ROLE_ID=
# DISCORD_STAFF_ROLE_IDS=
# DISCORD_ATTENDANCE_POLL_MS=
# DISCORD_NOTIFICATION_POLL_MS=
# NPC dispatch: dialogue event effects flagged "Post to Discord" are posted as
# amber embeds to this channel by the bot poll service (queued on the game
# event log entry until posted). Unset disables posting.
# DISCORD_NPC_EVENT_CHANNEL_ID=
# DISCORD_NPC_EVENT_POLL_MS=
# --- Arena (real-time match server, src/arena) ---
# Dedicated Node process hosting live Ordnance Disposal matches over WebSockets.
# Everything is opt-in: with these unset the game runs on the in-process
# registry + SSE exactly as before (kill switch / rollback path).
ARENA_PORT=4100
# Shared secret for: ticket verification (Next mints, arena verifies), arena
# REST auth (Next proxies the lifecycle), and the results callback header
# (arena -> Next). Generate with: openssl rand -hex 32. Set the SAME value for
# both services.
ARENA_SECRET=YOUR_ARENA_SECRET
# Server-side base URL the Next actions use to reach the arena (compose:
# http://arena:4100; Coolify: the arena service's internal URL). Setting this
# plus ARENA_SECRET switches match ownership to the arena backend.
ARENA_INTERNAL_URL=
# Client-side public WebSocket origin baked into the browser bundle at build
# time (prod: wss://arena.onyxsimple.com; local compose: ws://localhost:4100).
# Changing it requires a rebuild. Absent = pure HTTP transport.
NEXT_PUBLIC_ARENA_URL=
# --- Usage analytics (Microsoft Clarity) ---
# Project ID from clarity.microsoft.com (Settings > Project ID). Optional;
# leave unset to disable analytics entirely. The script only loads in
# production builds (never in local dev) and covers the frontend app and the
# login page, not the admin panel.
# NEXT_PUBLIC_CLARITY_ID=
# --- Arma 3 bridge (Pythia HTTP integration) ---
# Shared secret required by the /api/arma/v1/* routes. The Arma server sends
# it as the `x-arma-bridge-key` header alongside `x-arma-server-id`. Generate
# with: openssl rand -hex 32. Leave unset to disable the bridge (routes 503).
# ARMA_BRIDGE_API_KEY=
# Optional: exact URI for the test database (defaults to <DATABASE_URI database>_test)
# TEST_DATABASE_URI=postgres://ptfapp:polaristaskforcedb@127.0.0.1:5432/ptf-app-dev-test
# Optional: set to 1 to drop and recreate the test database from scratch instead of truncating
# TEST_DB_HARD_RESET=1