Last active
August 17, 2022 12:40
-
-
Save mr-linch/53d2701e576476328802449ffadfc133 to your computer and use it in GitHub Desktop.
Docker Compose with Postgres 14 and PgBouncer for local development
This file contains hidden or 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.9' | |
volumes: | |
postgres-data: | |
driver: local | |
services: | |
postgres: | |
image: postgres:14-alpine | |
environment: | |
POSTGRES_USER: my-project | |
POSTGRES_PASSWORD: my-project | |
POSTGRES_DB: my-project | |
command: postgres -c log_statement=all | |
volumes: | |
- postgres-data:/var/lib/postgresql/data | |
pgbouncer: | |
image: edoburu/pgbouncer:1.17.0 | |
ports: | |
- "5432:5432" | |
environment: | |
DATABASE_URL: postgres://my-project:my-project@postgres:5432/my-project | |
POOL_MODE: transaction | |
ADMIN_USERS: my-project | |
MAX_CLIENT_CONN: 1000 | |
AUTH_TYPE: plain | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment