From ab01b8e19be89dd7d8a29c3ead4368c48c9f0481 Mon Sep 17 00:00:00 2001 From: mrlan Date: Tue, 1 Nov 2022 21:43:01 +0800 Subject: [PATCH] Hui-Build (#55) Make English Pal docker run automatically each time after Ubuntu reboot. Hui Co-authored-by: Hui Lan Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/55 Co-authored-by: mrlan Co-committed-by: mrlan --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 7abbbf0..4348b2f 100755 --- a/build.sh +++ b/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