// DATABASES
Connect to DATABASE_URL
Where the connection string comes from, its format, and the per-plan connection limit.
DATABASE_URL is set as a system environment variable on the project and injected into the running container automatically — read it like any other env var, there's no SDK or client library required.
postgresql://{user}:{password}@{host}:{port}/{dbname}?sslmode=requireThis is a direct connection to the shared Postgres cluster, not a PgBouncer pool — AnySites doesn't provision a per-database connection pool, so pooling has to happen in your own app (see below). Most Postgres clients (pg, psycopg2, Prisma, SQLAlchemy) work against it with no special configuration.
postgresql+psycopg2:// (or +asyncpg) scheme, not the bare postgresql:// AnySites provides — rewrite the scheme in code rather than assuming the raw value works as-is.Connection pooling in your own app
The database's hard CONNECTION LIMIT is low relative to what a naive app can open — e.g. creating a new Prisma/SQLAlchemy client per request instead of a module-level singleton. Keep a single, reused connection pool per process, and size it well under the limit if you run more than one container instance.