LogoPixetric Docs

Connecting applications

Issue credentials safely across local dev, CI, and serverless runtimes

Pixetric exposes standard Postgres connection strings so any existing driver or ORM continues to work. Use the dashboard to create and rotate credentials for each environment.

Generate credentials

  1. Open your project and go to Branches.
  2. Select the branch you want to connect to and click Credentials.
  3. Create a credential for the app role (or any custom role you defined) and copy the generated connection string.

You can scope credentials per environment (dev, staging, production) and revoke them instantly if they are compromised.

Apply environment variables

Set the connection string as DATABASE_URL (and SHADOW_DATABASE_URL for Prisma) in the environment where your application runs:

DATABASE_URL=postgres://app:<token>@connect.pixetric.com:5432/my-app

When deploying to providers like Vercel, Cloudflare, or Render, store these values in their secrets manager so they are encrypted at rest.

Connection pooling

Each compute pool includes PgBouncer-compatible pooling. In the branch drawer enable Connection pooling to receive a separate URL (with pool=true). Pooling keeps serverless or high-concurrency workloads from exhausting connections.

Framework-specific notes

  • Next.js / Prisma – Define both DATABASE_URL and SHADOW_DATABASE_URL. Enable Prisma driver adapters for best performance with pooling.
  • Python / SQLAlchemy – Install psycopg[binary] or asyncpg, pass the connection string directly, and keep SSL mode set to require (default).
  • Go / pgx – Use the native config struct or DSN string; set PreferSimpleProtocol = true when pooling to avoid prepared statement limits.

Rotating credentials

Use the dashboard to revoke and recreate credentials without downtime. Applications reconnect automatically after you update the environment variable because compute pools maintain idle connections.