github.com/lorieri/deis@v1.3.1/deisctl/units/deis-store-gateway.service (about)

     1  [Unit]
     2  Description=deis-store-gateway
     3  
     4  [Service]
     5  EnvironmentFile=/etc/environment
     6  TimeoutStartSec=20m
     7  ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/store-gateway` && docker history $IMAGE >/dev/null 2>&1 || docker pull $IMAGE"
     8  ExecStartPre=/bin/sh -c "docker inspect deis-store-gateway >/dev/null 2>&1 && docker rm -f deis-store-gateway || true"
     9  ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/store-gateway` && docker run --name deis-store-gateway -h deis-store-gateway --rm -e HOST=$COREOS_PRIVATE_IPV4 -e EXTERNAL_PORT=8888 -p 8888:8888 $IMAGE"
    10  ExecStartPost=/bin/sh -c "until (echo 'Waiting for ceph gateway on 8888/tcp...' && curl -sSL http://localhost:8888|grep -e '<ID>anonymous</ID><DisplayName></DisplayName>' >/dev/null 2>&1); do sleep 1; done"
    11  ExecStopPost=-/usr/bin/docker rm -f deis-store-gateway
    12  Restart=on-failure
    13  RestartSec=5
    14  
    15  [Install]
    16  WantedBy=multi-user.target