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

     1  [Unit]
     2  Description=deis-router
     3  
     4  [Service]
     5  EnvironmentFile=/etc/environment
     6  TimeoutStartSec=20m
     7  ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/router` && docker history $IMAGE >/dev/null || docker pull $IMAGE"
     8  ExecStartPre=/bin/sh -c "docker inspect deis-router >/dev/null && docker rm -f deis-router || true"
     9  ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/router` && docker run --name deis-router --rm -p 80:80 -p 2222:2222 -p 443:443 -e EXTERNAL_PORT=80 -e HOST=$COREOS_PRIVATE_IPV4 $IMAGE"
    10  ExecStopPost=-/usr/bin/docker rm -f deis-router
    11  Restart=on-failure
    12  RestartSec=5
    13  
    14  [Install]
    15  WantedBy=multi-user.target
    16  
    17  [X-Fleet]
    18  Conflicts=deis-router@*.service