Skip to content

Commit

Permalink
Merge branch 'master' of github.com:zalando/spilo
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Kukushkin committed Apr 28, 2015
2 parents 8cfa799 + 4930b66 commit 1e09ccf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions postgres-appliance/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ ADD postgres_ha.sh /home/postgres/
RUN chown postgres:postgres /home/postgres/postgres_ha.sh
RUN chmod 700 /home/postgres/postgres_ha.sh

ENV ETCD_CLUSTER "default=http://127.0.0.1:7001"
ENV SCOPE "batman"
ENV ETCD_ADDRESS=""
ENV ETCD_DISCOVERY_URL postgres.acid.zalan.do
ENV SCOPE test
ENV DEBUG 0
# run subsequent commands as user postgres
USER postgres
Expand Down
12 changes: 8 additions & 4 deletions postgres-appliance/postgres_ha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ postgresql:
replication:
username: standby
password: standby
network: samenet
network: 0.0.0.0/0
parameters:
archive_mode: "on"
wal_level: hot_standby
Expand All @@ -38,11 +38,15 @@ write_postgres_yaml

# start etcd proxy
# for the -proxy on TDB the url of the etcd cluster
if [ "$DEBUG" -eq 1 ]
[ "$DEBUG" -eq 1 ] && exec /bin/bash

if [[ -n $ETCD_ADDRESS ]]
then
exec /bin/bash
# address is still useful for local debugging
etcd -name "proxy-$SCOPE" -proxy on -bind-addr 127.0.0.1:8080 --data-dir=etcd -initial-cluster $ETCD_ADDRESS &
else
etcd -name "proxy-$SCOPE" -proxy on -bind-addr 127.0.0.1:8080 --data-dir=etcd -discovery-srv $ETCD_DISCOVERY_URL &
fi
etcd -name "proxy-$SCOPE" -proxy on -bind-addr 127.0.0.1:8080 --data-dir=etcd -initial-cluster $ETCD_CLUSTER &

exec governor/governor.py "/home/postgres/postgres.yml"

Expand Down

0 comments on commit 1e09ccf

Please sign in to comment.