Claenup docker util scripts

This commit is contained in:
Jake Howard 2020-05-23 18:25:00 +01:00
parent ceca641e2f
commit d2269de4ad
Signed by: jake
GPG key ID: 57AFB45680EDD477
9 changed files with 23 additions and 41 deletions

View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
exec docker-compose -f "/opt/$1/docker-compose.yml" "${@:2}"

View file

@ -3,5 +3,5 @@
set -e
for compose_file in /opt/**/docker-compose.yml; do
docker-compose -f $compose_file pull --parallel
docker-compose -f "$compose_file" "$@"
done

View file

@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -e
for compose_file in /opt/**/docker-compose.yml; do
if [[ $(docker-compose -f $compose_file ps -q) ]]; then
docker-compose -f $compose_file down --remove-orphans
docker-compose -f $compose_file up -d
else
echo "> Skipping $compose_file as it's not running."
fi
done

View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
for compose_file in /opt/**/docker-compose.yml; do
if [[ $(docker-compose -f "$compose_file" ps -q) ]]; then
docker-compose -f "$compose_file" down --remove-orphans
docker-compose -f "$compose_file" up -d
else
echo "> Skipping $compose_file as it's not running."
fi
done

View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
exec docker-compose -f /opt/nextcloud/docker-compose.yml exec -u abc nextcloud php /config/www/nextcloud/occ "$@"

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
set -e
docker-compose -f /opt/nextcloud/docker-compose.yml exec -u abc nextcloud php /config/www/nextcloud/occ $@

View file

@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -e
for compose_file in /opt/**/docker-compose.yml; do
if [[ ! $(docker-compose -f $compose_file ps -q) ]]; then
docker-compose -f $compose_file up -d
else
echo "> Skipping $compose_file as it's running."
fi
done

View file

@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -e
for compose_file in /opt/**/docker-compose.yml; do
if [[ $(docker-compose -f $compose_file ps -q) ]]; then
docker-compose -f $compose_file down --remove-orphans
else
echo "> Skipping $compose_file as it's not running."
fi
done