fixing docker updater
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 3s
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 3s
This commit is contained in:
parent
84b0ce6cca
commit
00c4f5ceed
@ -53,26 +53,33 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Navigate on each folder and run docker-compose stop, pull and up -d
|
# Updating Docker containers
|
||||||
|
|
||||||
for folder in */; do
|
for folder in */; do
|
||||||
cd $folder
|
cd $folder
|
||||||
|
|
||||||
DOCKER_RUNNING=$(docker-compose ps -q)
|
# if .ignore file exists, skip the folder
|
||||||
|
if [ -f ".ignore" ]; then
|
||||||
|
echo -e "${LIGHT_BLUE}[$folder] Skipping docker container update"
|
||||||
|
cd ..
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
DOCKER_RUNNING=$(docker compose ps -q)
|
||||||
|
|
||||||
if [ -n "$DOCKER_RUNNING" ]; then
|
if [ -n "$DOCKER_RUNNING" ]; then
|
||||||
echo -e "${LIGHT_BLUE}[$folder] Stopping Docker containers"
|
echo -e "${LIGHT_BLUE}[$folder] Stopping Docker containers"
|
||||||
docker-compose down > /dev/null
|
docker compose down > /dev/null
|
||||||
else
|
else
|
||||||
echo -e "${LIGHT_BLUE}[$folder] No Docker containers running"
|
echo -e "${LIGHT_BLUE}[$folder] No Docker containers running"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${LIGHT_BLUE}[$folder] Updating images"
|
echo -e "${LIGHT_BLUE}[$folder] Updating images"
|
||||||
docker-compose pull > /dev/null
|
docker compose pull -q > /dev/null
|
||||||
|
|
||||||
if [ -n "$DOCKER_RUNNING" ]; then
|
if [ -n "$DOCKER_RUNNING" ]; then
|
||||||
echo -e "${LIGHT_BLUE}[$folder] Starting Docker containers"
|
echo -e "${LIGHT_BLUE}[$folder] Starting Docker containers"
|
||||||
docker-compose up -d > /dev/null
|
docker compose up -d > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${LIGHT_GREEN}[$folder] Updated!"
|
echo -e "${LIGHT_GREEN}[$folder] Updated!"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user