File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# This script is designed to be run inside the container
44#
55
6+ # fail hard and fast even on pipelines
7+ set -eo pipefail
8+
9+ # set debug based on envvar
10+ [[ $DEBUG ]] && set -x
11+
612# configure etcd
713export ETCD=${ETCD:- 172.17.42.1: 4001}
814export ETCD_PATH=${ETCD_PATH:-/ deis/ builder}
915export ETCD_TTL=${ETCD_TTL:- 10}
1016
11- # fail hard and fast even on pipelines
12- set -eo pipefail
13-
1417# wait for etcd to be available
1518until etcdctl -C $ETCD ls > /dev/null; do
1619 echo " waiting for etcd at $ETCD ..."
@@ -31,6 +34,10 @@ until confd -onetime -node $ETCD -config-file /app/confd.toml; do
3134 sleep $(( $ETCD_TTL / 2 )) # sleep for half the TTL
3235done
3336
37+ # spawn confd in the background to update services based on etcd changes
38+ confd -node $ETCD -config-file /app/confd.toml &
39+ CONFD_PID=$!
40+
3441# remove any pre-existing docker.sock
3542test -e /var/run/docker.sock && rm -f /var/run/docker.sock
3643
@@ -58,10 +65,6 @@ function on_exit() {
5865}
5966trap on_exit INT TERM EXIT
6067
61- # spawn confd in the background to update services based on etcd changes
62- confd -node $ETCD -config-file /app/confd.toml &
63- CONFD_PID=$!
64-
6568# publish the service to etcd using the injected HOST and PORT
6669if [[ ! -z $PUBLISH ]]; then
6770
Original file line number Diff line number Diff line change @@ -6,6 +6,4 @@ git = 1000
66mode = " 0600"
77keys = [
88 " /deis/builder/users" ,
9- ]
10- # check_cmd = "cat {{ .src }}"
11- # reload_cmd = "/usr/sbin/service nginx restart"
9+ ]
You can’t perform that action at this time.
0 commit comments