forked from mrlan/EnglishPal
Hui-Build (#55)
Make English Pal docker run automatically each time after Ubuntu reboot. Hui Co-authored-by: Hui Lan <lanhui@zjnu.edu.cn> Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/55 Co-authored-by: mrlan <mrlan@noreply.121.4.94.30> Co-committed-by: mrlan <mrlan@noreply.121.4.94.30>SPM2022F-CONTRIBUTORS-ChenQiuwei
parent
02ffcd3b59
commit
ab01b8e19b
4
build.sh
4
build.sh
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
DEPLOYMENT_DIR=/home/lanhui/EnglishPal
|
||||
DEPLOYMENT_DIR=/home/lanhui/englishpal2/EnglishPal
|
||||
cd $DEPLOYMENT_DIR
|
||||
|
||||
# Stop service
|
||||
|
@ -11,7 +11,7 @@ sudo docker rm EnglishPal
|
|||
sudo docker build -t englishpal .
|
||||
|
||||
# Run the application
|
||||
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
|
||||
sudo docker run --restart=always -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
|
||||
sudo docker system prune -a -f
|
||||
|
|
Loading…
Reference in New Issue