Skip to content

Instantly share code, notes, and snippets.

@sitano
Created November 4, 2021 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sitano/c7e61400f6064101e7e2d8fb05f8d853 to your computer and use it in GitHub Desktop.
Save sitano/c7e61400f6064101e7e2d8fb05f8d853 to your computer and use it in GitHub Desktop.
Local docker postgres+pgbouncer
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