Created
April 22, 2015 19:27
-
-
Save ngbinh/3964cdd7a40f11363d3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fleetctl cat deis-registry@1 | |
[Unit] | |
Description=deis-registry | |
[Service] | |
EnvironmentFile=/etc/environment | |
TimeoutStartSec=30m | |
ExecStartPre=-/usr/bin/etcdctl mkdir /deis/cache >/dev/null 2>&1 | |
ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/registry` && docker history $IMAGE >/dev/null 2>&1 || docker pull $IMAGE" | |
ExecStartPre=/bin/sh -c "docker inspect deis-registry >/dev/null 2>&1 && docker rm -f deis-registry || true" | |
ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/registry` && docker run --name deis-registry --rm -p 5000:5000 -e EXTERNAL_PORT=5000 -e HOST=$COREOS_PRIVATE_IPV4 $IMAGE" | |
ExecStopPost=-/usr/bin/docker rm -f deis-registry | |
Restart=on-failure | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target | |
[X-Fleet] | |
Conflicts=deis-registry@*.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment