github.com/didip/deis@v1.4.1/deisctl/units/deis-controller.service (about)

     1  [Unit]
     2  Description=deis-controller
     3  Requires=deis-store-volume.service
     4  After=deis-store-volume.service
     5  
     6  [Service]
     7  EnvironmentFile=/etc/environment
     8  TimeoutStartSec=20m
     9  ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller` && docker history $IMAGE >/dev/null || docker pull $IMAGE"
    10  ExecStartPre=/bin/sh -c "docker inspect deis-controller >/dev/null && docker rm -f deis-controller || true"
    11  ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller` && docker run --name deis-controller --rm -p 8000:8000 -e EXTERNAL_PORT=8000 -e HOST=$COREOS_PRIVATE_IPV4 -v /var/run/fleet.sock:/var/run/fleet.sock -v /var/lib/deis/store:/data $IMAGE"
    12  ExecStopPost=-/usr/bin/docker rm -f deis-controller
    13  Restart=on-failure
    14  RestartSec=5
    15  
    16  [Install]
    17  WantedBy=multi-user.target