Environment Variables

Every environment variable this project reads, grouped by concern. The full, always-current source is .env.example.

.env.example in the repo root is the canonical, always-current list — this page mirrors it in table form for quick lookup. Copy it to .env and fill in what you need; everything has a sensible default or degrades gracefully when unset.

Core

Variable Default Description
SECRET_KEY change-me Session secret — change in production
GRAVITY_ROOT cwd Base path for local content/uploads. Docker/Cloud Run set this to /app automatically
GRAVITY_TEMPLATE gravity Active theme — gravity (dark, default) or clarity (light)
GRAVITY_HOST_PORT 3001 Host-side port for make dev/make up/make editor
GRAVITY_DEV_ADMIN unset 1 bypasses admin auth for local editing. Never set in production
GRAVITY_DEV_PORTAL unset 1 opens /portal without a real customer login. Never set in production

Content store

See Storage for the full backend explanation.

Variable Backend it selects
GRAVITY_STORE_BACKEND Force one explicitly: local, gcs, s3, azure, r2, vercel_blob, netlify_blob
GRAVITY_SITE_BUCKET Google Cloud Storage
GRAVITY_S3_BUCKET + AWS_REGION AWS S3 (standard AWS credential chain otherwise)
GRAVITY_AZURE_CONTAINER + AZURE_STORAGE_CONNECTION_STRING Azure Blob Storage
GRAVITY_R2_BUCKET + CLOUDFLARE_ACCOUNT_ID + R2_ACCESS_KEY_ID + R2_SECRET_ACCESS_KEY + GRAVITY_R2_PUBLIC_URL Cloudflare R2
BLOB_READ_WRITE_TOKEN Vercel Blob (auto-injected once a store is linked)
NETLIFY (auto-set) / NETLIFY_BLOBS_SITE_ID + NETLIFY_BLOBS_TOKEN Netlify Blobs
GRAVITY_SITE_PREFIX Scopes every read/write/list to a subdirectory, for sharing one bucket/root across multiple site instances

Adhara connection

Variable Used for
ADHARA_API_URL Base API URL (defaults to Adhara’s hosted API)
ADHARA_API_KEY Authenticated requests (writes, admin-scoped reads)
ADHARA_WORKSPACE Workspace slug — public reads (events, links, scheduling, shop browsing)
ADHARA_WORKSPACE_ID Workspace UUID — required alongside the API key for authenticated calls (scheduling, gallery, form provisioning)

Per-feature backend toggles

All seven auto-detect from whatever Adhara config is present when left unset. See Overview for exactly what each one needs and how local/Adhara relate for that feature.

Variable Feature
GRAVITY_BLOG_BACKEND Blog writes (reads always merge local ∪ Adhara regardless)
GRAVITY_EVENTS_BACKEND Events
GRAVITY_PORTAL_BACKEND Customer portal
GRAVITY_SCHEDULING_BACKEND Scheduling & booking
GRAVITY_LINKS_BACKEND Links (link-in-bio)
GRAVITY_SHOP_BACKEND Shop / commerce
GRAVITY_GALLERY_BACKEND Media gallery

Not toggles — always-local or no-local-content features

Variable Feature
GRAVITY_PODCAST_RSS_URL Podcast feed URL — see Features

Contact and the newsletter signup have no env vars of their own beyond the shared ADHARA_* ones above — see Overview.

Edge caching (read at build time, in astro.config.mjs)

Variable Default Description
GRAVITY_EDGE_CACHE_TTL 60 Seconds a cached public page is served fully fresh. 0 disables edge caching entirely
GRAVITY_EDGE_CACHE_SWR 300 Extra seconds a stale cached response is served while a fresh one renders in the background

Unlike everything else on this page, these are read in astro.config.mjs, not by the running app — changing them needs a rebuild + redeploy to take effect. Always fully disabled under npm run dev. See Deploying for what’s actually cached and why.

Deploy-script-only (not read by the app)

These only matter when running scripts/deploy_*.sh / scripts/push_repo.sh — see Deploying.

Variable Effect
GRAVITY_STORAGE_SKIP=1 Skip the storage-provisioning wizard during a deploy, stay on ephemeral local files
VERCEL_LINK_GIT=1 Connect this repo’s git remote to the Vercel project during deploy_vercel.sh
PROVIDER=github|gitlab, REPO_NAME, REPO_VISIBILITY scripts/push_repo.sh — which provider/name/visibility to create