diff --git a/Dockerfile b/Dockerfile index 84b9cdf6..aea9ad97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,17 +12,21 @@ RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - RUN apt-get update -y RUN apt-get upgrade -y -ENV PGVERSION 9.4 -RUN apt-get install python python-yaml python-requests python-boto postgresql-${PGVERSION} python-dnspython python-kazoo python-pip -y -RUN apt-get install python-dev postgresql-server-dev-${PGVERSION} -y -RUN pip install python-etcd psycopg2 +ENV PGVERSION 9.5 +RUN apt-get install postgresql-${PGVERSION} postgresql-server-dev-${PGVERSION} -y +RUN apt-get install python python-dev python-pip -y +ADD requirements-py2.txt /requirements-py2.txt +RUN pip install -r /requirements-py2.txt ENV PATH /usr/lib/postgresql/${PGVERSION}/bin:$PATH ADD patroni.py /patroni.py ADD patroni/ /patroni -ENV ETCDVERSION 2.0.13 +RUN ln -s /patroni.py /usr/local/bin/patroni +RUN ln -s /patronictl.py /usr/local/bin/patronictl + +ENV ETCDVERSION 2.2.5 RUN curl -L https://github.com/coreos/etcd/releases/download/v${ETCDVERSION}/etcd-v${ETCDVERSION}-linux-amd64.tar.gz | tar xz -C /bin --strip=1 --wildcards --no-anchored etcd etcdctl ### Setting up a simple script that will serve as an entrypoint diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 9edb2120..71c6cb36 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -119,7 +119,8 @@ postgresql: archive_command: 'true' max_wal_senders: 20 listen_addresses: 0.0.0.0 - checkpoint_segments: 64 + max_wal_size: 1GB + min_wal_size: 128MB wal_keep_segments: 64 archive_timeout: 1800s max_replication_slots: 20