Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework docker compose script to allow future extensibility #1002

Merged
merged 4 commits into from
Nov 22, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions compose/bin/docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@ else
DOCKER_COMPOSE="docker-compose"
fi

COMPOSE_FILES=("compose.yaml" "compose.healthcheck.yaml")

if [ "$1" == "--no-dev" ]; then
${DOCKER_COMPOSE} -f compose.yaml -f compose.healthcheck.yaml "${@:2}"
# ensure --no-dev parameter isn't passed to docker compose
shift 1
else
${DOCKER_COMPOSE} -f compose.yaml -f compose.healthcheck.yaml -f compose.dev.yaml "$@"
COMPOSE_FILES+=("compose.dev.yaml")
fi

COMPOSE_FILES_PREFIXED=()
markshust marked this conversation as resolved.
Show resolved Hide resolved

for file in "${COMPOSE_FILES[@]}"; do
COMPOSE_FILES_PREFIXED+=("-f" "$file")
done

${DOCKER_COMPOSE} "${COMPOSE_FILES_PREFIXED[@]}" "$@"
Loading