Created
November 4, 2021 13:36
-
-
Save sitano/c7e61400f6064101e7e2d8fb05f8d853 to your computer and use it in GitHub Desktop.
Local docker postgres+pgbouncer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm --name pg -e POSTGRES_PASSWORD=123 -e POSTGRES_HOST_AUTH_METHOD=md5 postgres:latest | |
docker run --rm -e DATABASE_URL="postgres://postgres:123@172.17.0.2/postgres" -e POOL_MODE=session -p 5432:5432 --name pgb -it edoburu/pgbouncer /usr/bin/pgbouncer /etc/pgbouncer/pgbouncer.ini -v | |
psql postgres://postgres:123@pgb/ | |
# by default latest versions of PG use SASL+SCRAM-SHA-256 that is not support by the pgbouncer docker image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment