doxa-maps-cdn/.env.example
doxa-maps ba1a906168 Plugin Studio branch: the gallery and maps addresses are read per request, never baked
This branch sends readers to the Research Gallery (the public Plugin Studio
on its own subdomain) and loads the site's maps from that subdomain's /cdn.
Both addresses belong to the deployment:
  NUXT_PUBLIC_RESEARCH_GALLERY_URL  https://research.<host>/
  NUXT_PUBLIC_DX_MAPS_BASE          https://research.<host>/cdn/dx-maps

About 4,000 pages are prerendered, and a prerendered page carries the
build's runtime config, so an address read there is baked into the build.
One build could then serve only one deployment; the CDN branch failed that
way. So neither address is in nuxt.config any more:
- the server reads both from its environment per request
  (server/utils/dx-runtime.ts);
- GET /api/dx-runtime answers them, no-store. Every map (DoxaMapSlot via
  useDoxaMap, /research, /embed-test, and the static pages under public/)
  asks it first, then loads its bundle from that tree. The map's element is
  added only once the tree is known, and the map bundle's preload is added
  then, still while Mapbox downloads;
- every gallery link, the Research menu item, and the /regions and
  /countries index rules go to this site's /research-gallery?tab=&lang=,
  which 302s (no-store) to the gallery. It works without JavaScript, and a
  prerendered page names no host;
- old /js/doxa-maps and /embed/doxa-maps-build links are redirected per
  request by server/middleware/legacy-map-links.ts. They were build-time
  route rules.

No fallback host: the maps-dev and research defaults are gone. When a
setting is unset, /research-gallery answers 503 and each map says which
setting to set. Changing an address needs a restart, not a rebuild.
2026-09-29 04:48:59 +00:00

104 lines
4.8 KiB
Text

APP_TITLE=My App
DATABASE_URL=postgresql://user:password@localhost:5432/dbname
NODE_ENV=development
NUXT_PUBLIC_SITE_URL=http://localhost:3000
JWT_SECRET=your-super-secret-jwt-key-change-this
# SendGrid (transactional email: invites, password resets, verification).
# Sends through the v3 JSON API. The From address in SMTP_FROM must be on a
# domain authenticated in the SendGrid account.
SENDGRID_API_KEY=your-sendgrid-api-key
# Optional API host override; defaults to api.sendgrid.com (use api.eu.sendgrid.com for EU)
SENDGRID_HOST=
SMTP_FROM=noreply@yourdomain.com
SMTP_FROM_NAME=My App
S3_ENDPOINT=https://s3.us-west-004.backblazeb2.com
S3_REGION=us-west-004
S3_ACCESS_KEY_ID=your-access-key-id
S3_SECRET_ACCESS_KEY=your-secret-access-key
S3_BUCKET_NAME=your-bucket-name
# Optional: only required if you call uploadToS3(..., 'public') or getPublicUrl()
# Set to the custom domain attached to your bucket (e.g. Cloudflare R2 custom domain)
S3_PUBLIC_BASE_URL=https://cdn.example.com
# Prayer Tools integration
NUXT_PRAY_BASE_URL=https://pray.doxa.life
NUXT_PUBLIC_PRAY_BASE_URL=https://pray.doxa.life
FORM_API_KEY=your-form-api-key
# DOXA Prayer App store listings (app promo section on /pray and the research
# people group pages). Leave MOBILE_APP_APPLE_ID empty to hide the App Store
# badge until the iOS app is live.
MOBILE_APP_APPLE_ID=
MOBILE_APP_ANDROID_PACKAGE=life.doxa.pray
# Mapbox (used by the prayer map on /pray)
NUXT_PUBLIC_MAPBOX_TOKEN=your-mapbox-public-token
# The plugin-studio branch's two addresses, per deployment. Both are REQUIRED, and both are read by the
# server at REQUEST time (server/utils/dx-runtime.ts). They are never baked into a build, so one build
# serves any deployment. Changing them needs a restart, not a rebuild. There is no default host: when
# one is unset, the pages that need it say which setting is missing.
#
# The Research Gallery: the public Plugin Studio on its own subdomain. The menu's Research item, every
# in-page gallery link and the /regions index go here (through this site's /research-gallery).
# VPS: NUXT_PUBLIC_RESEARCH_GALLERY_URL=https://research.<host>/
# laptop: NUXT_PUBLIC_RESEARCH_GALLERY_URL=http://research.localhost:4616/
NUXT_PUBLIC_RESEARCH_GALLERY_URL=
#
# The dx-maps tree this site's maps load from: that subdomain's published /cdn. It must send
# Access-Control-Allow-Origin for the tree (the container does).
# VPS: NUXT_PUBLIC_DX_MAPS_BASE=https://research.<host>/cdn/dx-maps
# laptop: NUXT_PUBLIC_DX_MAPS_BASE=http://research.localhost:4616/cdn/dx-maps
NUXT_PUBLIC_DX_MAPS_BASE=
# Cloudflare Turnstile
NUXT_TURNSTILE_SITE_KEY=your-turnstile-site-key
NUXT_TURNSTILE_SECRET_KEY=your-turnstile-secret-key
# Statinator analytics (self-hosted tracking-server)
# Project must exist on the tracking-server with this site's hostname in allowed_domains.
# Set NUXT_PUBLIC_STATINATOR_ENABLED=false (or unset) to disable tracking entirely.
NUXT_PUBLIC_STATINATOR_URL=https://statinator.doxa.life
NUXT_PUBLIC_STATINATOR_PROJECT_ID=doxa
NUXT_PUBLIC_STATINATOR_ENABLED=true
# Cookie domain for the shared visitor ID (links activity across doxa.life and pray.doxa.life).
# Set to empty in dev to make the cookie host-only.
NUXT_PUBLIC_STATINATOR_COOKIE_DOMAIN=.doxa.life
# OpenRouter (used by the CMS "Auto-translate" workflow on /admin/pages/:id
# and the translate_text / translate_page MCP tools)
OPENROUTER_API_KEY=your-openrouter-api-key
# Optional model override. Admins can also set it at /admin/settings, which wins
# over this. Defaults to anthropic/claude-opus-5 when both are unset.
TRANSLATION_MODEL=
# Cloudflare cache purge on deploy (server/plugins/cloudflare-purge.ts).
# On container boot the edge cache is purged so stale prerendered HTML can't
# reference content-hashed assets the new deploy replaced. Leave both blank to
# disable (e.g. in dev). Token: My Profile → API Tokens → Custom Token with
# Zone → Cache Purge for the doxa.life zone. Zone ID: zone Overview page.
CF_API_TOKEN=
CF_ZONE_ID=
# OAuth 2.1 server
# Issuer is derived from NUXT_PUBLIC_SITE_URL; resource is `${siteUrl}/mcp`.
# Generate with: openssl rand -hex 32
OAUTH_CONSENT_COOKIE_SECRET=replace-me-at-least-32-bytes-of-random-hex-or-base64
OAUTH_ALLOW_DCR=false
# Path to the OAuth Nuxt layer (extends). Optional — leave blank to skip.
# Local dev typically points at a sibling checkout (e.g. ../../base-code/layers/oauth);
# prod can use a github: shorthand or a pinned path.
OAUTH_LAYER_PATH=
# MCP server layer (extends; depends on the OAuth layer).
# Path to the MCP Nuxt layer. Leave blank to skip the MCP transport.
MCP_LAYER_PATH=
# MCP server identity advertised in the `initialize` response.
MCP_SERVER_NAME=marketing-rebuild
MCP_SERVER_VERSION=1.0.0
# The map engine for every map: maplibre (keyless, the default) or mapbox (needs NUXT_PUBLIC_MAPBOX_TOKEN).
# NUXT_PUBLIC_MAP_PROVIDER=maplibre