docs: expand .env.example with full documented variable reference
Replaces the minimal 17-line stub with a comprehensive, commented reference covering all env vars: app/auth, database, Redis, SMTP, pgAdmin, logging, security/cron, and testing flags. Each section explains when the var is required and what values are expected. Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
+81
-13
@@ -1,17 +1,85 @@
|
|||||||
# Database
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
# CapaKraken — environment variable reference
|
||||||
|
#
|
||||||
|
# Copy this file to .env and fill in the values before running the app.
|
||||||
|
# Lines starting with # are comments. Lines with no value are optional.
|
||||||
|
#
|
||||||
|
# IMPORTANT: Never commit your actual .env file — it is gitignored.
|
||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
# ─── App / Auth ──────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
# REQUIRED — Public URL of the app (with scheme, no trailing slash).
|
||||||
|
# Used in email links (invites, password reset) and as the Auth.js base URL.
|
||||||
|
# Must use https:// in production.
|
||||||
|
NEXTAUTH_URL=https://capakraken.example.com
|
||||||
|
|
||||||
|
# REQUIRED — Secret used to sign and encrypt JWTs and session cookies.
|
||||||
|
# Generate one with: openssl rand -base64 32
|
||||||
|
# Must not be a known placeholder value in production (e.g. "changeme").
|
||||||
|
NEXTAUTH_SECRET=
|
||||||
|
|
||||||
|
# ─── Database ────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
# REQUIRED — PostgreSQL connection string.
|
||||||
|
# When running with Docker Compose the app container uses the Docker-internal
|
||||||
|
# host (postgres:5432); the host-level connection (for pnpm dev on the host)
|
||||||
|
# uses localhost:5433 (the published port).
|
||||||
DATABASE_URL=postgresql://capakraken:capakraken_dev@localhost:5433/capakraken
|
DATABASE_URL=postgresql://capakraken:capakraken_dev@localhost:5433/capakraken
|
||||||
DATABASE_URL_TEST=postgresql://capakraken:capakraken_test@localhost:5434/capakraken_test
|
|
||||||
ALLOW_DESTRUCTIVE_DB_TOOLS=false
|
|
||||||
CONFIRM_DESTRUCTIVE_DB_NAME=
|
|
||||||
|
|
||||||
# Redis
|
# ─── Redis ───────────────────────────────────────────────────────────────────
|
||||||
REDIS_URL=redis://localhost:6380
|
|
||||||
|
|
||||||
# Auth.js
|
# REQUIRED for SSE (real-time updates) and rate limiting.
|
||||||
NEXTAUTH_URL=http://localhost:3100
|
# When using Docker Compose this is handled automatically inside the container
|
||||||
# Local development only. Production must provide a long random secret outside the repository.
|
# (redis://redis:6379). Only needed when running `pnpm dev` directly on the host.
|
||||||
NEXTAUTH_SECRET=dev-secret-change-in-production
|
# REDIS_URL=redis://localhost:6380
|
||||||
|
|
||||||
# App
|
# Controls which backend is used for rate limiting.
|
||||||
NODE_ENV=development
|
# Values: "redis" (default, requires REDIS_URL) | "memory" (in-process, not
|
||||||
PORT=3100
|
# suitable for multi-instance deployments).
|
||||||
|
# RATE_LIMIT_BACKEND=redis
|
||||||
|
|
||||||
|
# ─── SMTP ────────────────────────────────────────────────────────────────────
|
||||||
|
#
|
||||||
|
# SMTP settings can be configured here OR via the Admin → Settings UI.
|
||||||
|
# Environment variables override the database values at runtime.
|
||||||
|
# If neither is set, email sending is silently skipped (logged at warn level).
|
||||||
|
#
|
||||||
|
# For local development the Docker Compose stack includes MailHog
|
||||||
|
# (http://localhost:8025) — no SMTP configuration is needed there.
|
||||||
|
|
||||||
|
# SMTP_HOST=smtp.example.com
|
||||||
|
# SMTP_PORT=587
|
||||||
|
# SMTP_USER=no-reply@example.com
|
||||||
|
# SMTP_PASSWORD=
|
||||||
|
# SMTP_FROM=CapaKraken <no-reply@example.com>
|
||||||
|
# SMTP_TLS=true # "true" = SMTPS (port 465); "false" = STARTTLS or plain
|
||||||
|
|
||||||
|
# ─── pgAdmin (dev / Docker Compose only) ─────────────────────────────────────
|
||||||
|
|
||||||
|
# REQUIRED when starting Docker Compose with the `full` profile.
|
||||||
|
# Used as the password for the pgAdmin web UI (http://localhost:5050).
|
||||||
|
PGADMIN_PASSWORD=
|
||||||
|
|
||||||
|
# Email shown on the pgAdmin login screen (default: admin@capakraken.dev).
|
||||||
|
# PGADMIN_EMAIL=admin@capakraken.dev
|
||||||
|
|
||||||
|
# ─── Logging ─────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
# Log verbosity. Values: trace | debug | info | warn | error | fatal
|
||||||
|
# Default: info
|
||||||
|
# LOG_LEVEL=info
|
||||||
|
|
||||||
|
# ─── Security / Cron ─────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
# Secret used to authenticate requests to cron endpoints (/api/cron/*).
|
||||||
|
# Generate one with: openssl rand -hex 32
|
||||||
|
# If not set, cron endpoints are disabled.
|
||||||
|
# CRON_SECRET=
|
||||||
|
|
||||||
|
# ─── Testing (never enable in production) ────────────────────────────────────
|
||||||
|
|
||||||
|
# Disables rate limiting and session tracking during end-to-end tests.
|
||||||
|
# MUST be "false" or unset in production — the runtime will refuse to start
|
||||||
|
# if this is "true" and NODE_ENV is "production".
|
||||||
|
# E2E_TEST_MODE=false
|
||||||
|
|||||||
Reference in New Issue
Block a user