summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2021-08-31 21:38:22 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2021-08-31 21:38:22 +0800
commitd463e5715c2bf26be01c033d7a225fcd39776590 (patch)
tree61059227c22efcbabbeaa0c2bf9bb19fc3c84556 /build.sh
parent26ec40f634201ae72a910cd826e4eaaca9e20135 (diff)
Prepre to use more recent stuff from Gitea
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..89d6543
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+cd /home/lanhui/englishpal
+
+# Stop service
+sudo docker stop EnglishPal
+sudo docker rm EnglishPal
+
+# Rebuild container. Run this after modifying the source code.
+sudo docker build -t englishpal .
+
+# Run the application
+sudo docker run -d --name EnglishPal -p 90:80 -v /home/lanhui/englishpal/app/static/frequency:/app/static/frequency -v /home/lanhui/englishpal/app/static/:/app/static/ -t englishpal # for permanently saving data
+
+# Save space. Run it after sudo docker run
+sudo docker system prune -a -f
+
+