neb/tools/server-docker-compose.sh

15 lines
286 B
Bash
Raw Normal View History

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