mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Docker improvements.
Latest greatest upstream (PostgreSQL 9.5, etcd 2.2.5) Install python packages using requirements file (vs installing from apt-get).
This commit is contained in:
+9
-5
@@ -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 update -y
|
||||||
RUN apt-get upgrade -y
|
RUN apt-get upgrade -y
|
||||||
|
|
||||||
ENV PGVERSION 9.4
|
ENV PGVERSION 9.5
|
||||||
RUN apt-get install python python-yaml python-requests python-boto postgresql-${PGVERSION} python-dnspython python-kazoo python-pip -y
|
RUN apt-get install postgresql-${PGVERSION} postgresql-server-dev-${PGVERSION} -y
|
||||||
RUN apt-get install python-dev postgresql-server-dev-${PGVERSION} -y
|
RUN apt-get install python python-dev python-pip -y
|
||||||
RUN pip install python-etcd psycopg2
|
ADD requirements-py2.txt /requirements-py2.txt
|
||||||
|
RUN pip install -r /requirements-py2.txt
|
||||||
|
|
||||||
ENV PATH /usr/lib/postgresql/${PGVERSION}/bin:$PATH
|
ENV PATH /usr/lib/postgresql/${PGVERSION}/bin:$PATH
|
||||||
|
|
||||||
ADD patroni.py /patroni.py
|
ADD patroni.py /patroni.py
|
||||||
ADD patroni/ /patroni
|
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
|
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
|
### Setting up a simple script that will serve as an entrypoint
|
||||||
|
|||||||
@@ -119,7 +119,8 @@ postgresql:
|
|||||||
archive_command: 'true'
|
archive_command: 'true'
|
||||||
max_wal_senders: 20
|
max_wal_senders: 20
|
||||||
listen_addresses: 0.0.0.0
|
listen_addresses: 0.0.0.0
|
||||||
checkpoint_segments: 64
|
max_wal_size: 1GB
|
||||||
|
min_wal_size: 128MB
|
||||||
wal_keep_segments: 64
|
wal_keep_segments: 64
|
||||||
archive_timeout: 1800s
|
archive_timeout: 1800s
|
||||||
max_replication_slots: 20
|
max_replication_slots: 20
|
||||||
|
|||||||
Reference in New Issue
Block a user