Skip to Content
Deployment

Deployment

Vercel (production)

Push to GitHub — Vercel auto-deploys from main.

Environment variables

Set these in Vercel dashboard (Settings > Environment Variables):

VariableRequiredDescription
SUPABASE_URLFor analyticsSupabase project URL
SUPABASE_ANON_KEYFor analyticsSupabase anon (publishable) key
ANALYTICS_PASSWORDFor dashboardPassword for /analytics
NEXT_PUBLIC_POSTHOG_KEYFor PostHogPostHog project API key
NEXT_PUBLIC_POSTHOG_HOSTFor PostHogPostHog host (e.g. https://eu.posthog.com)
POSTHOG_PERSONAL_API_KEYFor dashboardPostHog personal API key (server-side HogQL)

After deploying

Update BTTPIRINEUS_EMBED_DOMAIN in wordpress/bttpirineus-maps/bttpirineus-maps.php to match your Vercel production URL:

define('BTTPIRINEUS_EMBED_DOMAIN', 'https://btt-pirineus-embedded.vercel.app');

PostHog reverse proxy

The next.config.ts rewrites /ingest/* to PostHog’s EU ingestion endpoint. This avoids ad-blocker interference and CORS issues. No additional configuration needed on Vercel.

Local build

npm run build npm start

Starts the production server on http://localhost:3000.