mirror of
https://github.com/fruworg/infrastructure.git
synced 2024-11-16 05:17:17 +03:00
25 lines
451 B
Bash
Executable File
25 lines
451 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source /root/.bashrc
|
|
|
|
# Iterate through all folders in /opt
|
|
for FOLDER in /opt/*; do
|
|
if [ -d "$FOLDER" ]; then
|
|
echo "Processing folder: $FOLDER"
|
|
|
|
# Navigate into the folder
|
|
cd "$FOLDER" || continue
|
|
|
|
# Pull Docker Compose images
|
|
docker compose pull
|
|
|
|
# Bring up Docker Compose services in detached mode
|
|
docker compose up -d
|
|
|
|
# Return to the previous directory
|
|
cd -
|
|
fi
|
|
done
|
|
|
|
docker system prune -a -f
|