Answer the question
In order to leave comments, you need to log in
PgBouncer and Postgresql in Docker?
Trying to connect Pgbouncer and Postgresql inside docker.
docker-compose:
version: '3'
services:
db:
container_name: web_postgresql
image: postgres:13.0
volumes:
- pg_data:/var/lib/postgresql13/data/
ports:
- 5432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_db=postgres
pgbouncer:
container_name: pgbouncer
build: ./pgbouncer
restart: always
env_file:
- pgbouncer/pgbouncer.env
ports:
- 6432:6432
depends_on:
- db
FROM pgbouncer/pgbouncer
COPY pgbouncer.ini /opt/pgbouncer/etc/pgbouncer.ini
COPY userlist.txt /opt/pgbouncer/etc/userlist.txt
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question