2023-10-20 00:48:58 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# manage docker-compose with this macro
|
|
|
|
|
2023-10-20 02:09:35 +02:00
|
|
|
if ! [ -d "servers/$HOSTNAME" ]; then
|
|
|
|
echo "couldn't find servers/$HOSTNAME"
|
2023-10-20 00:48:58 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-10-20 02:09:35 +02:00
|
|
|
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 $@
|