Pull and the build the container while it's still up, reducing downtime.

This commit is contained in:
2025-11-16 07:00:45 -07:00
parent 0eb2ecf033
commit 9ab6335a3c

View File

@@ -179,11 +179,6 @@ if [[ -n $up || -n $down || -n $build || -n $pull || -n $maintenance ]]; then
fi
fi
# Shut off container.
if [[ $down == "Y" ]]; then
[ -e docker-compose.yml ] && docker compose down
fi
# Update container from remote source such as Docker Hub.
if [[ $pull == "Y" ]]; then
[ -e docker-compose.yml ] && docker compose pull
@@ -194,6 +189,11 @@ if [[ -n $up || -n $down || -n $build || -n $pull || -n $maintenance ]]; then
[ -e Dockerfile ] && docker compose build
fi
# Shut off container.
if [[ $down == "Y" ]]; then
[ -e docker-compose.yml ] && docker compose down
fi
# Run the container as a daemon.
if [[ $up == "Y" ]]; then
[ -e docker-compose.yml ] && docker compose up -d