Skip to content

Instantly share code, notes, and snippets.

@kelseyhightower
Created October 30, 2014 16:49
Show Gist options
  • Save kelseyhightower/0ab5d44d653187d55a05 to your computer and use it in GitHub Desktop.
Save kelseyhightower/0ab5d44d653187d55a05 to your computer and use it in GitHub Desktop.
[Unit]
Description=Go Commit Watcher
After=docker.service
Requires=docker.service
[Service]
ExecStartPre=/usr/bin/curl -s --create-dirs \
-z docker-commitwatcher.tar.gz \
-o /opt/docker-commitwatcher.tar.gz \
http://storage.googleapis.com/golang-testing/docker-commitwatcher.tar.gz
ExecStartPre=/usr/bin/docker load --input /opt/docker-commitwatcher.tar.gz
ExecStartPre=-/usr/bin/docker kill commitwatcher
ExecStartPre=-/usr/bin/docker rm commitwatcher
ExecStart=/usr/bin/docker run --rm --name commitwatcher gobuilders/commitwatcher
ExecStop=/usr/bin/docker stop commitwatcher
RestartSec=10s
Restart=always
Type=simple
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment