Hello Guys,
This is blog is related to issue of bitnami/postgresql-repmgr:12.11.0 docker image setup. While I was performing setup of bitnami/postgresql-repmgr image, I was facing below error and docker was running Restarting mode.
version: "3.0"
services:
instance-1-a1:
image: bitnami/postgresql-repmgr:12.11.0
container_name: instance-1-a1
restart: always
networks:
- database
ports:
- 5432:5432
volumes:
- ./instance-1-a1/conf/:/bitnami/repmgr/conf/
- ./instance-1-a1/logs/:/opt/bitnami/postgresql/logs/
environment:
- POSTGRESQL_PASSWORD=XXXXXXXXXX
- POSTGRESQL_POSTGRES_PASSWORD=XXXXXXXXX
- POSTGRESQL_USERNAME=postgres
- POSTGRESQL_DATABASE=pg-db
- REPMGR_NODE_NETWORK_NAME=host1
- REPMGR_NODE_ID=1
- REPMGR_PASSWORD=xxxxxxxxx
- REPMGR_PRIMARY_HOST=host1
- REPMGR_PRIMARY_PORT=5432
- REPMGR_PARTNER_NODES=host1,host2:5432,host3:5432
- REPMGR_NODE_NAME=instance-1-a1
- REPMGR_LOG_LEVEL=DEBUG
- REPMGR_PORT_NUMBER=5432
networks:
database:
--------------------------------------------------------------------
version: "3.0"
services:
instance-1:
image: bitnami/postgresql-repmgr:12.11.0
container_name: instance-1
restart: always
networks:
- database
ports:
- 5432:5432
volumes:
- ./instance-1-a1/conf/:/bitnami/repmgr/conf/
- ./instance-1-a1/logs/:/opt/bitnami/postgresql/logs/
environment:
- POSTGRESQL_PASSWORD=XXXXXXXXXX
- POSTGRESQL_POSTGRES_PASSWORD=XXXXXXXXX
- POSTGRESQL_USERNAME=postgres
- POSTGRESQL_DATABASE=pg-db
- REPMGR_NODE_NETWORK_NAME=host1
- REPMGR_NODE_ID=1
- REPMGR_PASSWORD=xxxxxxxxx
- REPMGR_PRIMARY_HOST=host1
- REPMGR_PRIMARY_PORT=5432
- REPMGR_PARTNER_NODES=host1,host2:5432,host3:5432
- REPMGR_NODE_NAME=instance-1
- REPMGR_LOG_LEVEL=DEBUG
- REPMGR_PORT_NUMBER=5432
networks:
database:
external: true
Note: Updated parameter marked in bold above, do not change hostname or any folder name.
$docker-compose down -v
$docker-compose up -d
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c5ad890ff90b bitnami/postgresql-repmgr:12.11.0 "/opt/bitnami/script…" 37 minutes ago Up 37 minutes 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp instance-1
No comments:
Post a Comment