Run pgbouncer using config from environment variables
164
Also on github https://github.com/donuk/docker-pgbouncer
A container for running PgBouncer, aimed at allowing full configuration via environment variables. This image wraps the official percona/percona-pgbouncer image and adds support for dynamically setting the listen_addr and listen_port options through environment variables.
Features
LISTEN_ADDR: Set the listen_addr in pgbouncer.ini via the environment. Defaults to 0.0.0.0 if not specified.
LISTEN_PORT: Set the listen_port in pgbouncer.ini via the environment. Defaults to 6432 if not specified.
On container startup, the entrypoint script rewrites pgbouncer.ini to ensure these values are set according to the environment.
Usage
Run the container as you would the original image, but you can now override the listening address and port entirely via environment variables:
docker run -e LISTEN_ADDR=0.0.0.0 -e LISTEN_PORT=6543 \
-v /your/pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini \
-p 6543:6543 \
donuk/pgbouncer
Content type
Image
Digest
sha256:8398a1112…
Size
80.1 MB
Last updated
3 months ago
docker pull donuk/pgbouncer