neb/tools/server-docker-compose.sh
2023-10-22 17:45:21 +02:00

15 lines
No EOL
291 B
Bash
Executable file

#!/bin/sh
# manage docker-compose with this macro
if ! [ -d "servers/$HOSTNAME" ]; then
echo "couldn't find servers/$HOSTNAME"
exit 1
fi
dc_args="-p $HOSTNAME"
for f in servers/$HOSTNAME/docker-compose.d/*.yml; do
dc_args="$dc_args -f $f"
done
exec docker-compose $dc_args $@