From 54e51de79e3d9d70c2286ba7f08311fd60efc48d Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Thu, 7 Jul 2022 14:58:10 +0200 Subject: [PATCH] Updated deploy script --- deploy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy b/deploy index 6c0b991..10a2a82 100755 --- a/deploy +++ b/deploy @@ -10,10 +10,14 @@ HOST_PORT="4000" git pull docker build -t "$IMAGE_NAME" . +# Tries to remove the previous container docker stop "$CONTAINER_NAME" || true +docker rm "$CONTAINER_NAME" || true + +# Starts the new container docker run -d \ --name "$CONTAINER_NAME" \ - --rm \ + --restart unless-stopped \ -p "$HOST_PORT:4000" \ -v "$(pwd)/buckets:/app/buckets" \ -v "$(pwd)/database.local.json:/app/database.local.json" \