Pull and the build the container while it's still up, reducing downtime.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user