neb/tools/server-docker-compose.sh

15 lines
No EOL
293 B
Bash
Executable file

#!/bin/bash
# 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
exec docker-compose $dc_args $@