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
- Open your project and go to Branches.
- Select the branch you want to connect to and click Credentials.
- Create a credential for the
approle (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-appWhen 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_URLandSHADOW_DATABASE_URL. Enable Prisma driver adapters for best performance with pooling. - Python / SQLAlchemy – Install
psycopg[binary]orasyncpg, pass the connection string directly, and keep SSL mode set torequire(default). - Go / pgx – Use the native config struct or DSN string; set
PreferSimpleProtocol = truewhen 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.
Pixetric Docs