2023-10-23 02:17:44 +02:00
|
|
|
#!/bin/bash
|
2023-10-20 00:48:58 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2023-10-22 17:02:01 +02:00
|
|
|
exec docker-compose $dc_args $@
|