Last active
February 24, 2019 18:56
-
-
Save PortNumber53/5bb39f827b1ae72b16459379d263128c to your computer and use it in GitHub Desktop.
docker-compose function
This file contains 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
function dc() { | |
COMMAND="docker-compose" | |
if [ -e ./docker-compose.yml ]; then | |
COMMAND="${COMMAND} -f docker-compose.yml" | |
fi | |
if [[ -a ./docker-compose.dev.yml ]]; then | |
COMMAND="${COMMAND} -f docker-compose.dev.yml" | |
fi | |
if [ -e ./docker/docker-compose.yml ]; then | |
COMMAND="${COMMAND} -f docker/docker-compose.yml" | |
fi | |
if [[ -a ./docker-compose.dev-yml ]]; then | |
COMMAND="${COMMAND} -f docker-compose-dev.yml" | |
fi | |
if [[ -a ./docker/docker-compose-dev.yml ]]; then | |
COMMAND="${COMMAND} -f docker/docker-compose-dev.yml" | |
fi | |
if [[ -a ./docker-compose.wdio.yml ]]; then | |
COMMAND="${COMMAND} -f docker-compose.wdio.yml" | |
fi | |
if [[ -a ./docker-compose.aws-dev.yml ]]; then | |
COMMAND="${COMMAND} -f docker-compose.aws-dev.yml" | |
fi | |
echo ${COMMAND} | |
eval "${COMMAND} $@" | |
# docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.wdio.yml -f docker-compose.aws-dev.yml $@ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment