Skip to content

Commit 46ae6fc

Browse files
author
Matthew Fisher
committed
fix(*): use host's IP address
1 parent 6d9fa16 commit 46ae6fc

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

bin/boot

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ set -eo pipefail
99
# set debug based on envvar
1010
[[ $DEBUG ]] && set -x
1111

12-
# HACK: get the host IP address through the default gateway
13-
export HOST=$(netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}')
14-
1512
# configure etcd
1613
export ETCD_PORT=${ETCD_PORT:-4001}
1714
export ETCD="$HOST:$ETCD_PORT"

systemd/deis-controller.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Description=deis-controller
33

44
[Service]
55
TimeoutStartSec=20m
6-
ExecStartPre=/usr/bin/docker pull deis/controller:latest
7-
ExecStart=/usr/bin/docker run --name deis-controller -p 8000:8000 -e PUBLISH=8000 deis/controller
6+
ExecStartPre=/usr/bin/docker pull deis/controller
7+
ExecStart=/bin/sh -c "HOST_IP=$(/bin/ifconfig eth0 | awk '/inet /{print $2}') && exec /usr/bin/docker run --name deis-controller -p 8000:8000 -e PUBLISH=8000 -e HOST=$HOST_IP deis/controller"
88
ExecStop=/usr/bin/docker rm -f deis-controller
99

1010
[Install]

0 commit comments

Comments
 (0)