Skip to content

Instantly share code, notes, and snippets.

@kelseyhightower
Created October 30, 2014 17:49
Show Gist options
  • Save kelseyhightower/1bc837a701f5aedad8c0 to your computer and use it in GitHub Desktop.
Save kelseyhightower/1bc837a701f5aedad8c0 to your computer and use it in GitHub Desktop.
[Unit]
Description=Go Commit Watcher
After=docker.service
Requires=docker.service
[Service]
ExecStartPre=/usr/bin/mkdir -p /opt/commitwatcher
ExecStartPre=/usr/bin/wget -q -N -P /opt/commitwatcher https://storage.googleapis.com/go-builder-data/docker-commitwatcher.tar.gz
ExecStartPre=/usr/bin/docker load --input /opt/commitwatcher/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