Listoca
Deployment

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.yml from this repository: Caddy for TLS and routing, PowerSync and its storage, the web app, the marketing site, the docs and the daily database backup.
HostGoes to
www.example.comthe marketing site, with the app link association files
app.example.comthe web app
docs.example.comthe docs
api.example.comSupabase's gateway: Auth, PostgREST, Storage, Edge Functions
sync.example.comPowerSync

The runbook is deploy/README.md: the first deploy step by step, updates, backups and restore. The files it uses:

FileWhat
deploy/supabase/install.shfetches Supabase's stack at a pinned release
deploy/supabase/overrides.env.exampleour values on Supabase's .env: hooks, redirects, keys
deploy/supabase/functions.env.examplethe Edge Functions' settings (mail, RevenueCat, push, AI)
deploy/supabase/sync-functions.shcopies the built functions into Supabase's volume
docker-compose.prod.yml, deploy/Caddyfileour services and their routing
.env.production.examplethe 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.

On this page