Multiple bitnami pgpool-II container

半城伤御伤魂 提交于 2021-01-07 01:27:24

问题


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 

来源:https://stackoverflow.com/questions/65349270/multiple-bitnami-pgpool-ii-container

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!