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

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