Skip to content

Instantly share code, notes, and snippets.

@MatejLach
Created February 16, 2020 22:07
Show Gist options
  • Save MatejLach/7b5157898961983b98ff292be5168716 to your computer and use it in GitHub Desktop.
Save MatejLach/7b5157898961983b98ff292be5168716 to your computer and use it in GitHub Desktop.
PgBouncer + Postgres
version: '3'
services:
db:
restart: always
image: postgres:latest
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=docker
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
pg-bouncer:
restart: always
image: edoburu/pgbouncer:latest
environment:
- DB_USER=postgres
- DB_PASSWORD=docker
- DB_HOST=db
- DB_NAME=postgres
- MAX_CLIENT_CONN=400
ports:
- 5432:5432
depends_on:
- db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment