summaryrefslogtreecommitdiff
path: root/buildscripts/build/chessh.service
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/build/chessh.service')
-rw-r--r--buildscripts/build/chessh.service19
1 files changed, 19 insertions, 0 deletions
diff --git a/buildscripts/build/chessh.service b/buildscripts/build/chessh.service
new file mode 100644
index 0000000..3281fcc
--- /dev/null
+++ b/buildscripts/build/chessh.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=CheSSH Server
+After=docker.service
+BindsTo=docker.service
+ReloadPropagatedFrom=docker.service
+WantedBy=default.target
+
+[Service]
+Restart=always
+ExecStartPre=-/usr/bin/docker stop chessh-server
+ExecStartPre=-/usr/bin/docker rm chessh-server
+ExecStart=/usr/bin/docker run \
+ --env-file $BUILD_ENV \
+ --network=host \
+ --name chessh-server \
+ chessh/server
+
+[Install]
+WantedBy=multi-user.target