Sign inSign up

mosquito/pgbouncer

By mosquito

Updated 11 months ago

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

Image
0

3.4K

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

Content type

Image

Digest

sha256:7d6c4ae37

Size

92.7 MB

Last updated

11 months ago

docker pull mosquito/pgbouncer