Service file to spin up Docker container

This commit is contained in:
Kai Hendry
2014-10-20 06:08:11 +00:00
parent 9b1519bbc0
commit 7c8723fb22
2 changed files with 19 additions and 4 deletions

15
greptweet.service Normal file
View File

@@ -0,0 +1,15 @@
[Unit]
# https://docs.docker.com/articles/host_integration/
# https://coreos.com/docs/launching-containers/launching/getting-started-with-systemd/
Description=Greptweet
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill greptweet1
ExecStartPre=-/usr/bin/docker rm greptweet1
ExecStart=/usr/bin/docker run --name greptweet1 -v /srv/www/greptweet.com:/srv/http/u -p 80:80 greptweet
[Install]
WantedBy=multi-user.target