From 65d78d5250a47f2534f2230fa5b64296fbe20492 Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Tue, 1 Nov 2022 21:35:22 +0800 Subject: [PATCH] build.sh: automatically restart docker container after Ubuntu reboot --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 52f9e92..4348b2f 100755 --- a/build.sh +++ b/build.sh @@ -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