aboutsummaryrefslogtreecommitdiffstats
path: root/davical.service
diff options
context:
space:
mode:
authorDennis Eriksen <dennis@terje.dnns.no>2019-02-09 17:35:01 +0100
committerDennis Eriksen <dennis@terje.dnns.no>2019-02-09 17:35:01 +0100
commit01bcbb06070cdbca194b8d6806b5f548ad619da9 (patch)
treef14bddab82a80f53c01c49572536b59dbcba739b /davical.service
parentrolling new release. Now with script to add packages needed to roll upgrade (diff)
downloaddavical-docker-01bcbb06070cdbca194b8d6806b5f548ad619da9.tar.gz
adding systemd-service-fileHEADmaster
Diffstat (limited to 'davical.service')
-rw-r--r--davical.service21
1 files changed, 21 insertions, 0 deletions
diff --git a/davical.service b/davical.service
new file mode 100644
index 0000000..b78ccaf
--- /dev/null
+++ b/davical.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=DAViCal Docker container
+Requires=network.target docker.service watchtower.service
+After=watchtower.service
+
+[Service]
+# Don't restart - it will conflict with watchtower.
+Restart=no
+
+# Start with removing old images
+ExecStartPre=-/usr/bin/docker rm -f davical
+ExecStart=/usr/bin/docker run --rm \
+ --name davical \
+ --env-file /etc/systemd/system/davical.service.d/env \
+ --publish 2203:80 \
+ dennis/davical:v0.7
+
+ExecStop=/usr/bin/docker stop -t 2 davical
+
+[Install]
+WantedBy=default.target