forked from mrlan/EnglishPal
Merge pull request 'build.sh: use a variable DEPLOYMENT_DIR to represent the code folder' (#24) from Deployment into master
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/24Bug395-Anxiuxiu
commit
b9cf94da74
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