summaryrefslogtreecommitdiff
path: root/app/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'app/build.sh')
-rwxr-xr-xapp/build.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/build.sh b/app/build.sh
new file mode 100755
index 0000000..52cc695
--- /dev/null
+++ b/app/build.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+cd /home/lanhui/englishpal
+
+# Stop service
+sudo service docker restart
+
+# Rebuild container. Run this after modifying the source code.
+sudo docker build -t englishpal .
+
+# Run the application
+sudo docker run -d -p 90:80 -v /home/lanhui/englishpal/app/static/frequency:/app/static/frequency -t englishpal # for permanently saving data
+
+# Save space. Run it after sudo docker run
+sudo docker system prune -a -f
+
+