28 lines
523 B
Django/Jinja
28 lines
523 B
Django/Jinja
#!/usr/bin/env bash
|
|
# code: language=bash
|
|
|
|
ARG="$1"
|
|
APPS_DIR="{{ apps_data_root }}"
|
|
|
|
case $ARG in
|
|
start)
|
|
for app in $APPS_DIR/*; do
|
|
docker compose -f $app/docker-compose.yml up --remove-orphans -d
|
|
done
|
|
;;
|
|
stop)
|
|
for app in $APPS_DIR/*; do
|
|
docker compose -f $app/docker-compose.yml down --remove-orphans
|
|
done
|
|
;;
|
|
restart)
|
|
for app in $APPS_DIR/*; do
|
|
docker compose -f $app/docker-compose.yml restart
|
|
done
|
|
;;
|
|
*)
|
|
echo "Unrecognized argument"
|
|
exit 1
|
|
;;
|
|
esac
|