Skip to content

Instantly share code, notes, and snippets.

@charlesmarshall
Last active August 29, 2015 14:04
Show Gist options
  • Save charlesmarshall/72209d999146b43eb107 to your computer and use it in GitHub Desktop.
Save charlesmarshall/72209d999146b43eb107 to your computer and use it in GitHub Desktop.
basic website service file
[Unit]
Description=Example website
After=etcd.service
After=docker.service
[Service]
ExecStop=/usr/bin/bash -l -c "docker stop $image_name ;"
ExecStart=/usr/bin/bash -l -c "docker pull $registry_ip:5000/$image_name ; docker run --rm --name $container_name -p 80:80 -i $image_name /bin/bash -l -c "service nginx start";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment