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

81 lines
3.5 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=
# Roll call: mission attendance embeds and roll-call posts go here (ops channel).
# DISCORD_OPS_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=
# DISCORD_STAFF_ROLE_IDS=
# DISCORD_ATTENDANCE_POLL_MS=
# DISCORD_NOTIFICATION_POLL_MS=
# --- 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