add to path for postgres

This commit is contained in:
Bernhard Radermacher
2026-02-19 12:53:07 +01:00
parent 7c8b8b9b21
commit a5493c2553
3 changed files with 23 additions and 0 deletions

View File

@@ -152,6 +152,7 @@ RUN ln -sT docker-ensure-initdb.sh /usr/local/bin/docker-enforce-initdb.sh
RUN touch /etc/repmgr.conf && chmod 666 /etc/repmgr.conf
COPY bashrc /var/lib/postgresql/.bashrc
COPY docker-entrypoint-initdb.d/* /docker-entrypoint-initdb.d/
ENTRYPOINT ["docker-entrypoint.sh"]

1
bashrc Normal file
View File

@@ -0,0 +1 @@
export PATH="${PATH}:/usr/lib/postgresql/15/bin"

View File

@@ -14,6 +14,27 @@ if [[ -z $UPSTREAM ]]; then
echo "max_wal_senders = 10" >> /var/lib/postgresql/data/postgresql.conf
echo "max_replication_slots = 10" >> /var/lib/postgresql/data/postgresql.conf
# ensure required entries in hba
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
local replication repmgr trust
host replication repmgr 127.0.0.1/32 trust
host replication repmgr 100.64.0.0/10 trust
local repmgr repmgr trust
host repmgr repmgr 127.0.0.1/32 trust
host repmgr repmgr 100.64.0.0/10 trust
host all all all scram-sha-256
echo "local replication repmgr trust" >> /var/lib/postgresql/data/pg_hba.conf
echo "host replication repmgr ${NETWORK:-100.64.0.0/10} trust" >> /var/lib/postgresql/data/pg_hba.conf
echo "local repmgr repmgr trust" >> /var/lib/postgresql/data/pg_hba.conf