briqbriq

PostgreSQL

A PostgreSQL database with a persistent volume. Optional pgvector.

  • database
  • sql

Guides: Give Claude Code a database, Run tests against real services, Connect to a database from outside

Run it

briq_run({
  recipe: "postgres",
  params: {
    "version": "16",
    "extensions": [],
    "size": "small",
    "diskGb": 2
  },
  wait: true
})

Parameters

NameTypeOptionsDefault
versionenum15, 16, 17"16"
extensionsenum[]pgvector[]
sizeenumnano, small, medium, large"small"
diskGbnumber—2

Outputs

Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.

DATABASE_URL
postgres://postgres:<POSTGRES_PASSWORD>@db.<stack>.internal:5432/app
PGHOST
db.<stack>.internal
PGPORT
5432
PGUSER
postgres
PGPASSWORD
<POSTGRES_PASSWORD>
PGDATABASE
app

What it runs

BriqImagePortsSizeVolume
dbpostgres:165432small2 GB at /var/lib/postgresql/data

When to use it

  • Migrations, seeds or an ORM schema need a real database to be checked against.
  • An integration suite expects DATABASE_URL and you want neither mocks nor Docker.
  • Vector search: extensions: ["pgvector"] switches to the pgvector/pgvector image.

Tips

  • Run SQL inside the briq. DATABASE_URL is private: briq_files_put a file, then briq_exec with psql -U postgres -d app -v ON_ERROR_STOP=1 -f /file.sql.
  • nano is enough for schema checks and small fixtures.
  • Data survives stops, so keep the briq while iterating and destroy it at the end.
  • From another briq, use DATABASE_URL as is.
  • Connect from outside: briq_expose port 5432 with protocol: "postgres" gives a connection string over TLS, for psql or a BI tool. See Connect to a database from outside.
  • No TLS inside the stack: the connection stays on the stack's private network. An app set up to require SSL (sslmode=require, or settings written for a hosting platform, such as ssl_require=True in Django) refuses to connect: turn that requirement off in the app's settings.
  • Need a bigger database? The volume starts small: pass diskGb, e.g. params: { diskGb: 20 }. Set it when the briq is created, and it counts toward your plan's disk.

On this page

Free to try

Let your agent try it, on us.

Every new account starts with €10 of credits. No card.

Connect your agent

How can we help?

Message to the briq team
hello@briq.cloud