forked from mrlan/EnglishPal
build.sh: use a variable DEPLOYMENT_DIR to represent the code folder
parent
2a92881581
commit
8647af3158
7
build.sh
7
build.sh
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cd /home/lanhui/englishpal2/EnglishPal
|
DEPLOYMENT_DIR=/home/lanhui/EnglishPal
|
||||||
|
cd $DEPLOYMENT_DIR
|
||||||
|
|
||||||
# Stop service
|
# Stop service
|
||||||
sudo docker stop EnglishPal
|
sudo docker stop EnglishPal
|
||||||
|
@ -10,9 +11,7 @@ sudo docker rm EnglishPal
|
||||||
sudo docker build -t englishpal .
|
sudo docker build -t englishpal .
|
||||||
|
|
||||||
# Run the application
|
# Run the application
|
||||||
sudo docker run -d --name EnglishPal -p 90:80 -v /home/lanhui/englishpal2/EnglishPal/app/static/frequency:/app/static/frequency -v /home/lanhui/englishpal2/EnglishPal/app/static/:/app/static/ -t englishpal # for permanently saving data
|
sudo docker run -d --name EnglishPal -p 90:80 -v ${DEPLOYMENT_DIR}/app/static/frequency:/app/static/frequency -v ${DEPLOYMENT_DIR}/app/static/:/app/static/ -t englishpal # for permanently saving data
|
||||||
|
|
||||||
# Save space. Run it after sudo docker run
|
# Save space. Run it after sudo docker run
|
||||||
sudo docker system prune -a -f
|
sudo docker system prune -a -f
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue