Skip to content

Instantly share code, notes, and snippets.

@dginther
Created April 29, 2014 21:33
Show Gist options
  • Save dginther/43f470422b65508a12a0 to your computer and use it in GitHub Desktop.
Save dginther/43f470422b65508a12a0 to your computer and use it in GitHub Desktop.
[Service]
TimeoutStartSec=20m
ExecStartPre=/bin/sh -c "/usr/bin/docker history deis/controller >/dev/null || /usr/bin/docker pull deis/controller"
ExecStart=/bin/sh -c "IFACE=$(netstat -nr | grep ^0.0.0.0 | awk '{print $8}') && HOST_IP=$(/bin/ifconfig $IFACE |grep ^inet|cut -d: -f2| awk '{print $2}') && exec /usr/bin/docker run --name deis-controller -p 8000:8000 -e PUBLISH=8000 -e HOST=$HOST_IP --volumes-from=deis-logger deis/controller"
ExecStop=/usr/bin/docker rm -f deis-controller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment