Deployment
One Linux host with Docker - Supabase's self-hosted stack beside this repository's compose file for Caddy, PowerSync and the web apps.
The template runs self-hosted on one Linux host with Docker, as two Compose projects side by side:
- Supabase's own stack in
/opt/supabase: Postgres, Auth, PostgREST, Storage, Edge Functions and the Kong gateway. Supabase maintains it, and it updates with Supabase's own steps. docker-compose.prod.ymlfrom this repository: Caddy for TLS and routing, PowerSync and its storage, the web app, the marketing site, the docs and the daily database backup.
| Host | Goes to |
|---|---|
www.example.com | the marketing site, with the app link association files |
app.example.com | the web app |
docs.example.com | the docs |
api.example.com | Supabase's gateway: Auth, PostgREST, Storage, Edge Functions |
sync.example.com | PowerSync |
The runbook is deploy/README.md: the first deploy step by step, updates, backups and
restore. The files it uses:
| File | What |
|---|---|
deploy/supabase/install.sh | fetches Supabase's stack at a pinned release |
deploy/supabase/overrides.env.example | our values on Supabase's .env: hooks, redirects, keys |
deploy/supabase/functions.env.example | the Edge Functions' settings (mail, RevenueCat, push, AI) |
deploy/supabase/sync-functions.sh | copies the built functions into Supabase's volume |
docker-compose.prod.yml, deploy/Caddyfile | our services and their routing |
.env.production.example | the domains, image names and passwords our services need |
On a server run by Coolify, Coolify replaces the runbook:
Supabase comes from Coolify's template and docker-compose.coolify.yml holds our services.
The images
The Images workflow builds the web app, the marketing site and the docs as Docker images and
pushes them to GHCR; it runs when started by hand (Actions → Images → Run workflow). Public
settings are baked in at build time from repository variables: API_DOMAIN,
SUPABASE_PUBLISHABLE_KEY, the store URLs, analytics. On Coolify the
server builds the images itself. The native app is built with EAS (LAUNCH.md).
The order of an update
Migrations, then functions, then the sync config, then the web images. Installed apps keep running against the new server, so a migration only adds: no renames or drops in the same release. The runbook has the details.
Coding agents
AGENTS.md and project skills, so Claude Code, Cursor, Codex and others follow the template's conventions.
Coolify
The first deploy and every update on servers run by Coolify - Supabase as its one-click service, docker-compose.coolify.yml for PowerSync and the web apps, and scripts/coolify.ts for staging and production.