New:New releases:CLIcreate-clubedge-app v0.49.1·Clubedge Starter v0.32.0

Clubedge Starter Docs

Netlify

Deploy the app to Netlify from apps/web, with check:env and migrations in the build.

apps/web/netlify.toml deploys the app to Netlify. Netlify only runs the app: the database, Redis, file storage, and email come from your providers (for example Neon or Supabase, Upstash, and Cloudflare R2).

A project with a frontend and its API can't use this option yet: it deploys on any container host or Railway. Nor can a project without a website, whose API deploys on any container host or Railway: the CLI refuses this option for it.

pnpm clubedge deploy does these steps for you: the site, its base directory, the variables, and the deploy.

What netlify.toml sets

The build command: pnpm run check:env && pnpm --dir ../.. db:migrate && pnpm run build.

  • check:env (Starter v0.18.0 or newer) stops the build when a variable the project's modules need is unset, points at localhost, or isn't an absolute URL, and lists each one. SKIP_ENV_CHECK=1 builds anyway.
  • Migrations: Netlify has no step that runs before a release, so the build applies them against the DATABASE_URL of the deploy context. Give deploy previews their own database, or remove the migration step and run migrations yourself.
  • The build: with Next.js, Netlify installs its Next.js runtime automatically and publishes .next; with TanStack Start, the build detects Netlify and writes its functions and static assets to dist.

Deploy by hand

Import the repository in Netlify, set the site's Base directory to apps/web, and add the production variables for every deploy context you build (production and deploy previews). Set NEXT_PUBLIC_APP_URL to the site's URL before the first build, since Next.js compiles it in.

Also set CLIENT_IP_HEADER=x-nf-client-connection-ip in the site's settings, where Netlify puts each client's address (Starter v0.27.0 or newer). Netlify takes runtime variables only from the site's settings, not from netlify.toml.

Serverless functions open a connection per instance: use your provider's pooled connection URL (Supabase's transaction pooler or Neon's pooled endpoint).

Background jobs

Netlify runs no worker for background jobs. Set JOBS_WORKER=off and CRON_SECRET, then call /api/jobs/run every minute from a scheduled function or another scheduler, with the header Authorization: Bearer <CRON_SECRET>.

The deploy workflow

The Deploy job installs the workspace and runs netlify deploy --build --prod from apps/web: it builds with netlify.toml (including its migrations) and the site's variables, then deploys. It needs the secrets NETLIFY_AUTH_TOKEN, a personal access token, and NETLIFY_SITE_ID, from the site's settings.

How is this guide?