Created
February 16, 2020 22:07
-
-
Save MatejLach/7b5157898961983b98ff292be5168716 to your computer and use it in GitHub Desktop.
PgBouncer + Postgres
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
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