neb/tools/server-docker-compose.sh

15 lines
291 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
2023-10-22 17:02:01 +02:00
exec docker-compose $dc_args $@