#!/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 $@