Skip to content

Instantly share code, notes, and snippets.

@ngbinh
Created April 22, 2015 19:27
Show Gist options
  • Save ngbinh/3964cdd7a40f11363d3a to your computer and use it in GitHub Desktop.
Save ngbinh/3964cdd7a40f11363d3a to your computer and use it in GitHub Desktop.
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