Files

99 lines
4.4 KiB
Bash

# =============================================================================
# Payload CMS — environment template.
# Copy this file to `apps/cms/.env` and fill in real values. Never commit `.env`.
#
# Required for boot: PAYLOAD_SECRET, DATABASE_URL
# Required for "Create PR": GITHUB_OWNER, GITHUB_REPO,
# GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY,
# GITHUB_INSTALLATION_ID
# Required in production: NEXT_PUBLIC_SERVER_URL, NEXT_PUBLIC_WEB_URL
# Everything else has a sensible default — see comments below.
# =============================================================================
# --- Core --------------------------------------------------------------------
# Required in every environment. Generate via `openssl rand -hex 32`.
# Production builds throw when this is unset.
PAYLOAD_SECRET=change-me
# --- Database ----------------------------------------------------------------
# Postgres connection string. Local dev uses the same URL as production by
# default; isolate per-environment by setting PAYLOAD_DB_SCHEMA below.
#
# Supabase example (transaction pooler, port 6543):
# postgresql://postgres.<project-ref>:<password>@aws-1-<region>.pooler.supabase.com:6543/postgres
DATABASE_URL=postgresql://user:password@host:6543/postgres
# Schema scope for Payload tables. Defaults to "payload" — change per env if
# the same Postgres database hosts multiple environments (e.g. "payload_dev").
# PAYLOAD_DB_SCHEMA=payload
# Max Postgres clients opened by each CMS runtime. Defaults are 1 on Vercel,
# 3 locally, and 10 on self-hosted production. Keep Vercel low when using
# Supabase's session pooler, where pool_size is often limited.
# PAYLOAD_DB_POOL_MAX=3
# Postgres timeout guards in milliseconds. These prevent Vercel functions from
# hanging until the platform timeout when Supabase or the pooler is unreachable.
# PAYLOAD_DB_CONNECTION_TIMEOUT_MS=5000
# PAYLOAD_DB_QUERY_TIMEOUT_MS=15000
# PAYLOAD_DB_IDLE_TIMEOUT_MS=5000
# PAYLOAD_HEALTH_TIMEOUT_MS=10000
# Schema auto-sync. Defaults to true (Phase 1 bootstrap). Flip to "false"
# once SQL migrations are wired up so production no longer mutates schema on
# every boot. See payload.config.ts for the full rationale.
# PAYLOAD_DB_PUSH=true
# --- URLs --------------------------------------------------------------------
# CMS host. On Vercel, falls back to https://$VERCEL_URL when unset.
# Required in self-hosted production.
NEXT_PUBLIC_SERVER_URL=http://localhost:3001
# Web frontend host (used for CORS + CSRF allow-list).
# Required in self-hosted production.
NEXT_PUBLIC_WEB_URL=http://localhost:3000
# --- GitHub workflow ---------------------------------------------------------
# Required by the Admin "Create PR" action. The CMS workflow service uses
# these to open content branches and pull requests against the canonical repo.
GITHUB_OWNER=logos-co
GITHUB_REPO=logos-web
# GitHub App installation. Personal access tokens are intentionally unsupported
# so CMS-created GitHub actions are attributed to the App, not a personal user.
# App permissions required:
# - Repository: Contents read+write, Pull requests read+write,
# Metadata read-only
# Multiline private key: keep on one line with literal \n separators, OR use
# your shell's $'...' quoting. Quotes around the value are recommended.
GITHUB_APP_ID=123456
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----"
GITHUB_INSTALLATION_ID=12345678
# --- Branch + PR config (defaults shown — uncomment only to override) --------
# Branch the PR opens against. The repo currently runs `develop` as the
# default branch (production `master` does not yet exist — see
# docs/cms-github-content-plan.md "Branch Strategy Adoption").
GITHUB_PR_BASE_BRANCH=develop
# Long-lived staging branch where CMS PRs land first. Defaults to "develop".
# GITHUB_STAGING_BRANCH=develop
# Production branch — promoted to via a separate develop→master PR.
# Defaults to "master".
# GITHUB_PRODUCTION_BRANCH=master
# Prefix on every CMS-managed branch (e.g. "content/circle-london-2026-04").
# Defaults to "content/".
# GITHUB_CONTENT_BRANCH_PREFIX=content/
# Safety guard. When false (default), the mutation service refuses to commit
# straight to staging or production branches; only branches with the content
# prefix are writable. Set to "true" ONLY in local dev to allow direct commits
# while debugging — never in shared environments.
# CONTENT_DIRECT_COMMIT_ENABLED=false