aboutsummaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-05 17:30:58 +0800
committercrupest <crupest@outlook.com>2020-11-05 17:30:58 +0800
commit5321e0a4fac931c4a17f515799bf37948d1cea0e (patch)
tree144001c014bb6a24f36da88f253a625c01f0c2af /deploy
parentf133ab13af46f27785bd92e75016152d3877dac2 (diff)
downloadtimeline-5321e0a4fac931c4a17f515799bf37948d1cea0e.tar.gz
timeline-5321e0a4fac931c4a17f515799bf37948d1cea0e.tar.bz2
timeline-5321e0a4fac931c4a17f515799bf37948d1cea0e.zip
deploy: Add some deploy script.
Diffstat (limited to 'deploy')
-rw-r--r--deploy/timeline.service13
-rw-r--r--deploy/upgrade.bash6
2 files changed, 19 insertions, 0 deletions
diff --git a/deploy/timeline.service b/deploy/timeline.service
new file mode 100644
index 00000000..0402ffbb
--- /dev/null
+++ b/deploy/timeline.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Timeline docker service.
+After=docker.service
+Wants=network-online.target docker.socket
+Requires=docker.socket
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/docker start -a timeline
+ExecStop=/usr/bin/docker stop -t 10 timeline
+
+[Install]
+WantedBy=multi-user.target
diff --git a/deploy/upgrade.bash b/deploy/upgrade.bash
new file mode 100644
index 00000000..156bb1ca
--- /dev/null
+++ b/deploy/upgrade.bash
@@ -0,0 +1,6 @@
+docker pull crupest/timeline:latest
+sudo systemctl stop timeline.service
+docker rm timeline
+docker create -v $HOME/timeline:/timeline -p 5000:80 --name timeline crupest/timeline:latest
+sudo systemctl restart timeline.service
+docker system prune