Skip to content

Commit 10f07b7

Browse files
authored
More verbose documentation with comments
1 parent fc3870d commit 10f07b7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

compose/bin/docker-compose

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ fi
88

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

11+
# If --no-dev is passed to this script, we won't load the compose.dev.yaml file,
12+
# but this argument should be removed so it isn't passed to docker compose.
1113
if [ "$1" == "--no-dev" ]; then
12-
# ensure --no-dev parameter isn't passed to docker compose
14+
# Remove the "--no-dev" argument so it isn't passed to docker compose
1315
shift 1
1416
else
17+
# The "--no-dev" argument wasn't passed in, so let's load the dev config.
1518
COMPOSE_FILES+=("compose.dev.yaml")
1619
fi
1720

18-
# We create an array including files prefixed with -f here
19-
# to ensure paths with spaces aren't split when passed as parameters
21+
# Loop over the list of compose files, and prefix them with -f.
22+
# This ensures paths with spaces aren't split when passed as parameters.
2023
COMPOSE_FILES_PREFIXED=()
2124
for file in "${COMPOSE_FILES[@]}"; do
2225
COMPOSE_FILES_PREFIXED+=("-f" "$file")

0 commit comments

Comments
 (0)