Databases
On an app's first deploy, Tower provisions a dedicated Postgres role and database — owned by that role, with CONNECT revoked from PUBLIC — and injects the connection string as the app's DATABASE_URL secret. Connections are pooled through PgBouncer.
const sql = new Bun.SQL(process.env.DATABASE_URL) const rows = await sql`select now()`
Vectors
Tenant databases ship with the pgvector extension, so you can store and query embeddings for search and RAG without any setup.
CREATE TABLE docs (id bigserial primary key, embedding vector(1536));