Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zpascal/pgbouncer-container
The repository includes a PgBouncer connection pooler docker container
https://github.com/zpascal/pgbouncer-container
Last synced: 20 days ago
JSON representation
The repository includes a PgBouncer connection pooler docker container
- Host: GitHub
- URL: https://github.com/zpascal/pgbouncer-container
- Owner: ZPascal
- License: apache-2.0
- Created: 2021-05-05T06:56:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-02T18:10:00.000Z (5 months ago)
- Last Synced: 2024-10-19T06:04:31.979Z (2 months ago)
- Language: Shell
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PgBouncer Docker container
## Influenced repositories
- https://github.com/edoburu/docker-pgbouncer
- https://github.com/mbentley/dockerfiles## Used versions
- [alpine:3.20](https://hub.docker.com/_/alpine)
- [pgBouncer 1.23.1](https://github.com/pgbouncer/pgbouncer/releases/tag/pgbouncer_1_23_1)
## Supported setup parameter
| 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 |## Functionality
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.## Docker-compose example
```yaml
version: '3'services:
pgbouncer:
image: z9pascal/pgbouncer
environment:
- PG_ENV_POSTGRESQL_USER=pgbouncer
- PG_ENV_POSTGRESQL_PASS=pgbouncer
ports:
- "6432:6432"
```## Contribution
If you would like to contribute, have an improvement request, or want to make a change inside the code, please open a pull request.
## Support
If you need support, or you encounter a bug, please don't hesitate to open an issue.
## Donations
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.
## License
This product is available under the Apache 2.0 [license](LICENSE).