Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyperized/pgbouncer-docker
A small (~11MB) Alpine based PgBouncer Docker image
https://github.com/hyperized/pgbouncer-docker
alpine docker pgbouncer psql
Last synced: 27 days ago
JSON representation
A small (~11MB) Alpine based PgBouncer Docker image
- Host: GitHub
- URL: https://github.com/hyperized/pgbouncer-docker
- Owner: hyperized
- License: mit
- Created: 2018-11-06T08:53:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-02T09:17:29.000Z (3 months ago)
- Last Synced: 2024-09-28T18:05:03.972Z (about 1 month ago)
- Topics: alpine, docker, pgbouncer, psql
- Language: Dockerfile
- Homepage:
- Size: 29.3 KB
- Stars: 14
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [pgbouncer-docker](https://github.com/hyperized/pgbouncer-docker)
A small Alpine based pgbouncer Docker image## To pull container
```docker pull hyperized/pgbouncer```
## To build container
```docker build -t hyperized/pgbouncer .```
## To run container
```docker run -v $(pwd):/m -p 6543:6543 hyperized/pgbouncer /m/example.ini```
## To run container with TLS to PostgreSQL server
Commonly used with PHP as local connection pool to eliminate TLS overhead.
Expects `ca.crt`, `key.pem` and `cert.pem` to be present in current folder.
See `tls.ini` for details
```docker run -v $(pwd):/m -p 6543:6543 hyperized/pgbouncer /m/tls.ini```
Expect output to be like:
```shell script
2024-07-03 12:44:17.990 UTC [1] LOG kernel file descriptor limit: 1048576 (hard: 1048576); max_client_conn: 100, max expected fd use: 152
2024-07-03 12:44:17.991 UTC [1] LOG listening on 0.0.0.0:6543
2024-07-03 12:44:17.991 UTC [1] LOG listening on unix:/tmp/.s.PGSQL.6543
2024-07-03 12:44:17.991 UTC [1] LOG process up: PgBouncer 1.22.0, libevent 2.1.12-stable (epoll), adns: c-ares 1.24.0, tls: OpenSSL 3.1.4 24 Oct 2023
```To log in with this example:
```
psql -h 127.0.0.1 -p 6543 -U user@secure pgbouncer
```with the password `mypass` (as described in `password.txt`)
## To show stats
```
psql -h 127.0.0.1 -p 6543 pgbouncerpsql (16.3, server 1.23.0/bouncer)
Type "help" for help.pgbouncer=# SHOW STATS;
```## Reference
Docker hub: https://hub.docker.com/r/hyperized/pgbouncer
Github: https://github.com/hyperized/pgbouncer-docker