HUB
Sign inSign up
pgbouncer logo

mosquito/pgbouncer

By mosquito

•Updated about 1 year ago

PGBouncer Docker image with Configuration from environment, Multiprocessing and Prometheus metrics

Image
0

4.8K

mosquito/pgbouncer repository overview

⁠PGBouncer

PGBouncer Docker image with prometheus exporter and dynamic configuration from environment.

See complete documentation here⁠

A distinctive feature of this image is the entrypoint, which provides:

  • Multiprocessing support. Several PgBouncer processes are started on the same port, which ensures the utilization of more than one core.
  • Support for metrics in prometheus format.
  • Fully dynamic configuration from environment variables.

⁠Example

Minimal config:

docker run --rm -it --name pgbouncer \
     -p 8080:8080 \
     -p 6432:6432 \
     -e databases_template1="host=127.0.0.1 dbname=template1 auth_user=someuser" \
     -e pgbouncer_pool_mode="session" \
     -e auth_mosquito="strong-db-secret-11!" \
     mosquito/pgbouncer

User specific config example:

docker run --rm -it --name pgbouncer \
     -p 8080:8080 \
     -p 6432:6432 \
     -e databases_template1="host=127.0.0.1 dbname=template1 auth_user=someuser" \
     -e pgbouncer_pool_mode="session" \
     -e auth_mosquito="strong-db-secret-11!" \
     -e user_mosquito="pool_mode=session max_user_connections=5" \
     mosquito/pgbouncer
Tag summary
Recent tags
Content type
Image
Digest
sha256:7d6c4ae37…
Size
92.7 MB
Last updated
about 1 year ago
docker pull mosquito/pgbouncer:latest