Skip to content

Commit

Permalink
Add Patroni updates for static_single_node support
Browse files Browse the repository at this point in the history
  • Loading branch information
thedodd committed Apr 5, 2022
1 parent a9a0fa8 commit 07305f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ RUN for postgisv in ${POSTGIS_VERSIONS}; do \
# Patroni and Spilo Dependencies
# This need to be done after the PostgreSQL packages have been installed,
# to ensure we have the preferred libpq installations etc.
RUN apt-get install -y patroni
RUN apt-get install -y patroni=2.1.3-2

RUN for file in $(find /usr/share/postgresql -name 'postgresql.conf.sample'); do \
# We want timescaledb to be loaded in this image by every created cluster
Expand Down Expand Up @@ -453,6 +453,11 @@ RUN rm /etc/pgbackrest.conf && ln -s "${PGBACKREST_CONFIG}" /etc/pgbackrest.conf
## to make this work nicely, they need to exist though
RUN for i in $(seq 0 7); do touch "${PGLOG}/postgresql-$i.log" "${PGLOG}/postgresql-$i.csv"; done

## Patch Patroni code with changes from https://github.com/timescale/patroni/pull/1
## This is a temporary solution until changes land upstream.
RUN wget -qO- https://raw.githubusercontent.com/timescale/patroni/v2.2.0-beta.0/patroni/ha.py > /usr/lib/python3/dist-packages/patroni/ha.py && \
wget -qO- https://raw.githubusercontent.com/timescale/patroni/v2.2.0-beta.0/patroni/config.py > /usr/lib/python3/dist-packages/patroni/config.py

## Fix permissions
RUN chown postgres:postgres "${PGLOG}" "${PGROOT}" "${PGDATA}" /var/run/postgresql/ -R
RUN chown postgres:postgres /var/log/pgbackrest/ /var/lib/pgbackrest /var/spool/pgbackrest -R
Expand Down

0 comments on commit 07305f7

Please sign in to comment.