Skip to content

Commit

Permalink
Merge pull request #72 from drnic/override-patroni-scope
Browse files Browse the repository at this point in the history
allow $PATRONI_SCOPE to be set via 'docker run -e PATRONI_SCOPE=ironman'
  • Loading branch information
Oleksii Kliukin committed Oct 21, 2015
2 parents 2d7909e + 5d7e4fe commit e2261f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
function usage()
{
cat <<__EOF__
Usage: $0
Usage: $0
Options:
--etcd ETCD Provide an external etcd to connect to
--name NAME Give the cluster a specific name
--name NAME Give the cluster a specific name
--etcd-only Do not run Patroni, run a standalone etcd
Examples:
$0 --etcd=127.17.0.84:4001
$0 --etcd-only
$0
$0
$0 --name=true_scotsman
__EOF__
}

DOCKER_IP=$(hostname --ip-address)
PATRONI_SCOPE=batman
PATRONI_SCOPE=${PATRONI_SCOPE:-batman}

optspec=":vh-:"
while getopts "$optspec" optchar; do
Expand All @@ -32,7 +32,7 @@ while getopts "$optspec" optchar; do
exec etcd --data-dir /tmp/etcd.data \
-advertise-client-urls=http://${DOCKER_IP}:4001 \
-listen-client-urls=http://0.0.0.0:4001 \
-listen-peer-urls=http://0.0.0.0:2380
-listen-peer-urls=http://0.0.0.0:2380
exit 0
;;
cheat)
Expand Down

0 comments on commit e2261f5

Please sign in to comment.