1
0
Fork 0

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
mrlan 2022-11-01 21:43:01 +08:00
parent 02ffcd3b59
commit ab01b8e19b
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
DEPLOYMENT_DIR=/home/lanhui/EnglishPal DEPLOYMENT_DIR=/home/lanhui/englishpal2/EnglishPal
cd $DEPLOYMENT_DIR cd $DEPLOYMENT_DIR
# Stop service # Stop service
@ -11,7 +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 ${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 # Save space. Run it after sudo docker run
sudo docker system prune -a -f sudo docker system prune -a -f