File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,22 +72,22 @@ CONFD_PID=$!
7272
7373echo deis-controller running...
7474
75- # publish the service to etcd using the injected PORT
76- if [[ ! -z $PUBLISH ]]; then
75+ # publish the service to etcd using the injected EXTERNAL_PORT
76+ if [[ ! -z $EXTERNAL_PORT ]]; then
7777
7878 # configure service discovery
7979 PORT=${PORT:- 8000}
8080 PROTO=${PROTO:- tcp}
8181
8282 set +e
8383
84- # wait for the service to become available on PUBLISH port
84+ # wait for the service to become available on PORT
8585 sleep 1 && while [[ -z $( netstat -lnt | awk " \$ 6 == \" LISTEN\" && \$ 4 ~ \" .$PORT \" && \$ 1 ~ \" $PROTO .?\" " ) ]] ; do sleep 1; done
8686
8787 # while the port is listening, publish to etcd
8888 while [[ ! -z $( netstat -lnt | awk " \$ 6 == \" LISTEN\" && \$ 4 ~ \" .$PORT \" && \$ 1 ~ \" $PROTO .?\" " ) ]] ; do
8989 etcdctl --no-sync -C $ETCD set $ETCD_PATH /host $HOST --ttl $ETCD_TTL > /dev/null
90- etcdctl --no-sync -C $ETCD set $ETCD_PATH /port $PUBLISH --ttl $ETCD_TTL > /dev/null
90+ etcdctl --no-sync -C $ETCD set $ETCD_PATH /port $EXTERNAL_PORT --ttl $ETCD_TTL > /dev/null
9191 sleep $(( $ETCD_TTL / 2 )) # sleep for half the TTL
9292 done
9393
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ func TestController(t *testing.T) {
4646 "--name" , name ,
4747 "--rm" ,
4848 "-p" , port + ":8000" ,
49- "-e" , "PUBLISH =" + port ,
49+ "-e" , "EXTERNAL_PORT =" + port ,
5050 "-e" , "HOST=" + host ,
5151 "-e" , "ETCD_PORT=" + etcdPort ,
5252 "deis/controller:" + tag )
You can’t perform that action at this time.
0 commit comments