# Copy to .env for local development: `make setup` does this for you.

# Either set DATABASE_URL directly...
DATABASE_URL=postgres://test:test@localhost:5432/test

# ...or the individual PG_* variables (used only when DATABASE_URL is unset):
PG_HOST=localhost
PG_PORT=5432
PG_USER=test
PG_PASSWORD=test
PG_DBNAME=test
PG_SSLMODE=disable
PG_BOUNCER_MODE=false

# Pool tuning (all optional — see README.md's Configuration reference for defaults).
PG_MAX_CONNS=10
PG_MIN_CONNS=2
PG_MAX_CONN_LIFETIME=1h
PG_MAX_CONN_LIFETIME_JITTER=0
PG_MAX_CONN_IDLE_TIME=30m
PG_HEALTH_CHECK_PERIOD=1m
PG_SLOW_QUERY_THRESHOLD=200ms
# The "pool" metric label (default "default"); must match ^[a-z][a-z0-9_]{0,31}$.
PG_POOL_NAME=default

# PgBouncer, if using `make docker-up-all`.
PGBOUNCER_DATABASE_URL=postgres://test:test@localhost:6432/test

# Metric identity (pgcommon.metrics.identity_from_env): the `service` label when not given.
APP_NAME=pgcommon-dev
# Wheel / image build version used by the Makefile only — not a metric label.
BUILD_VERSION=0.0.0-dev
# Metric identity: environment comes from APP_ENV, then ENVIRONMENT, else "dev".
APP_ENV=dev
