Need clarification if this is doable. I have successfully ran Postgres with 2 containers namely master
and slave
. I would like to know if I can run more than one pgpool container ? If yes, is there any specific environment variables i need to set ?
Can I just take the below command and run in another pgpool VM ? My intention is to have a load balancer round robin between the 2 pgpool that connects to the backend of master (rw) and slave (ro).
docker run --detach --rm --name pgpool \
--network my-network \
--env PGPOOL_BACKEND_NODES=0:pg-0:5432,1:pg-1:5432 \
--env PGPOOL_SR_CHECK_USER=customuser \
--env PGPOOL_SR_CHECK_PASSWORD=custompassword \
--env PGPOOL_ENABLE_LDAP=no \
--env PGPOOL_POSTGRES_USERNAME=postgres \
--env PGPOOL_POSTGRES_PASSWORD=adminpassword \
--env PGPOOL_ADMIN_USERNAME=admin \
--env PGPOOL_ADMIN_PASSWORD=adminpassword \
bitnami/pgpool:latest