neb/tools/server-docker-compose.sh

15 lines
294 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)"
exit 1
fi
dc_args="-p $(hostname)"
for f in servers/$(hostname)/docker-compose.d/*.yml; do
dc_args="$dc_args -f $f"
done
docker-compose $dc_args $@