- https://github.com/edoburu/docker-pgbouncer
- https://github.com/mbentley/dockerfiles
Env variable | Default value | Example value | Required |
---|---|---|---|
PG_ENV_POSTGRESQL_USER | pgbouncer | Yes | |
PG_ENV_POSTGRESQL_PASS | pgbouncer | Yes | |
PG_PORT_5432_TCP_ADDR | localhost | No | |
PG_PORT_5432_TCP_PORT | 5432 | No | |
PG_ENV_POSTGRESQL_MAX_CLIENT_CONN | 10000 | 10000 | No |
PG_ENV_POSTGRESQL_DEFAULT_POOL_SIZE | 400 | 400 | No |
PG_ENV_POSTGRESQL_SERVER_IDLE_TIMEOUT | 240 | 240 | No |
PG_ENV_POSTGRESQL_POOL_MODE | session | session | No |
The run script creates automatically the corresponding configuration and sets the PG_ENV_POSTGRESQL_USER
variable as stats_user inside the PgBouncer configuration. After the preparation step, the run script starts pgbouncer automatically and the container bound the port 6432
to share the PgBouncer service.
version: '3'
services:
pgbouncer:
image: z9pascal/pgbouncer
environment:
- PG_ENV_POSTGRESQL_USER=pgbouncer
- PG_ENV_POSTGRESQL_PASS=pgbouncer
ports:
- "6432:6432"
If you would like to contribute, have an improvement request, or want to make a change inside the code, please open a pull request.
If you need support, or you encounter a bug, please don't hesitate to open an issue.
If you want to support my work, I ask you to take an unusual action inside the open source community. Donate the money to a non-profit organization like Doctors Without Borders or the Children's Cancer Aid. I will continue to build tools because I like them, and I am passionate about developing and sharing applications.
This product is available under the Apache 2.0 license.