Database
Operate the current Postgres and Supabase data services.
Ciele uses Postgres with pgvector. The Compose db profile also runs authentication, PostgREST, storage, and one gateway.
You can replace the Postgres container with a managed Postgres you already own. See External database. The other services stay the same.
Apply migrations
The one-shot migrate service applies pending SQL migrations and creates required storage buckets. The application starts after this service succeeds.
Do not edit an applied migration. Add a new migration for every schema change.
Local development
pnpm db:start
pnpm db:reset
pnpm db:statuspnpm db:reset deletes local database data and applies migrations and seed data again.
Persistent data
The postgres-data volume contains the database. The storage-data volume contains uploaded objects.
Back up both volumes for a complete data copy. Test restoration before you depend on a backup process.
With an external database, the provider keeps the database backups. The storage-data volume still lives on your host. Back up the volume together with the database, and restore both to the same point in time.
Volume deletion removes data
docker compose -f deploy/docker-compose.yml down -v deletes the database and uploaded-file volumes. Use it only for an intentional reset.
Tenant isolation
Console requests use authenticated database access and row-level security. API-key operations use an Organization-pinned database wrapper and capability checks.