Created
January 22, 2023 21:54
-
-
Save TimKraemer/a2e7b06e7cae66aaa8cf78db6a1322cc to your computer and use it in GitHub Desktop.
docker-compose wrapper for multiple yaml config files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# put this to /usr/local/bin/dc | |
command="$(which docker-compose) -f /opt/services/docker-compose.yaml" | |
for f in $(find /opt/services -maxdepth 1 -type f -name "*.yaml" 2>/dev/null); do | |
[[ ${f} =~ "docker-compose.yaml" ]] && continue | |
command="${command} -f ${f}" | |
done | |
${command} "${@}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
written by @jkuettner