Remove the container and start a new one after upgrade.

This commit is contained in:
2025-04-06 12:30:56 +03:00
parent 9ffbe59356
commit 678af03cd5

View File

@@ -483,6 +483,7 @@ upgrade() {
# 255 is -1, because Bash return codes are unsigned 8-bit integer, limited to the range 0 to 255. # 255 is -1, because Bash return codes are unsigned 8-bit integer, limited to the range 0 to 255.
-1|255) -1|255)
print_header "No changes detected. Skipping upgrade..." print_header "No changes detected. Skipping upgrade..."
return -1
;; ;;
0) 0)
@@ -498,6 +499,14 @@ upgrade() {
;; ;;
esac esac
print_header "Upgraded the Docker image.
We will stop & delete the current container and start a new one..."
stop
docker remove $CONTAINER_NAME
start
print_header "Upgraded the Middleware Successfully!" print_header "Upgraded the Middleware Successfully!"
return 0 return 0
} }