requireArmaServer (src/lib/arma-bridge/server.ts) wraps the shared bridge auth + game-servers lookup that every v1 route repeated; asJson (json.ts) narrows untrusted request values to what Payload's json field validation accepts (strings normalize to the fallback instead of failing the write). All four v1 routes now use both. Also document the ARMA_BRIDGE_API_KEY env var missed when the bridge routes landed.
66 lines
No EOL
2.7 KiB
Text
66 lines
No EOL
2.7 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
|
|
|
|
# --- 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=
|
|
# DISCORD_OPS_CHANNEL_ID=
|
|
# DISCORD_ANNOUNCE_CHANNEL_ID=
|
|
# DISCORD_STAFF_ROLE_IDS=
|
|
# DISCORD_ATTENDANCE_POLL_MS=
|
|
# DISCORD_NOTIFICATION_POLL_MS=
|
|
|
|
# --- 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= |