# Production environment template for rn-platform-01's `api` service. # Copy to platform.env OUTSIDE git (see infra/backup/README.md "secrets" and # docs/PRODUCTION_DEPLOYMENT.md §10), fill in real values, never commit the filled file. # infra/.gitignore already excludes *.env (only *.env.template is tracked). # ── Postgres ──────────────────────────────────────────────────────────────────────────── # `postgres`/`provisioner` are Docker Compose service names, not localhost — production runs # these on a named bridge network (rn-platform-internal), not network_mode: host like dev. PLATFORM_DB_URL=postgres://rootnode_platform:__REPLACE_WITH_STRONG_PASSWORD__@postgres:5432/rootnode_platform # ── Provisioner ───────────────────────────────────────────────────────────────────────── PROVISIONER_URL=http://provisioner:4100 PROVISIONER_SHARED_SECRET=__REPLACE_openssl_rand_hex_32__ # ── Listen ────────────────────────────────────────────────────────────────────────────── PLATFORM_API_PORT=4300 # ── Sessions (production values — do NOT inherit dev defaults) ──────────────────────────── STUDENT_SESSION_TTL_HOURS=8 STUDENT_SESSION_IDLE_HOURS=2 INSTRUCTOR_SESSION_TTL_HOURS=12 INSTRUCTOR_SESSION_IDLE_HOURS=2 # ── Cookies / proxy — MUST be set for production, unlike dev ────────────────────────────── # Secure requires the origin to actually be HTTPS end-to-end (see docs/PRODUCTION_NETWORK_SECURITY.md §8). COOKIE_SECURE=1 # Only set to 1 once a trusted reverse proxy (Cloudflare/nginx/Caddy, see infra/docker/reverse-proxy/) # is actually in front of the Gateway — otherwise req.ip becomes spoofable via X-Forwarded-For. TRUST_PROXY=1 # ── Frontend (baked into the platform/api image at build time; listed here for reference) ─ # FRONTEND_DIST_DIR=/frontend-dist # ── Future OIDC (Phase 3A adapter — not wired yet, see docs/PHASE3A_IDENTITY_AND_INSTRUCTOR_ACCESS.md §16) ─ # OIDC_ISSUER_URL= # OIDC_CLIENT_ID= # OIDC_CLIENT_SECRET=__do_not_commit__ # OIDC_REDIRECT_URL=https://academy.example.com/api/auth/oidc/callback