summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/README.md2
-rwxr-xr-xapp/build.sh17
2 files changed, 18 insertions, 1 deletions
diff --git a/app/README.md b/app/README.md
index cca3150..ab7c217 100644
--- a/app/README.md
+++ b/app/README.md
@@ -48,4 +48,4 @@ sudo docker ps -a
sudo docker logs image_name, where image name could be obtained from sudo docker ps.
-
+build.sh contains all the above commands. Run sudo ./build.sh to rebuild the web application.
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
+
+