#!/usr/bin/env bash if docker compose version > /dev/null 2>&1; then DOCKER_COMPOSE="docker compose" else DOCKER_COMPOSE="docker-compose" fi COMPOSE_FILES_LIST=("compose.yaml" "compose.healthcheck.yaml") if [ "$1" == "--no-dev" ]; then # ensure --no-dev parameter isn't passed to docker compose shift 1 else COMPOSE_FILES_LIST+=("compose.dev.yaml") fi # Combine files, prefix each with -f COMPOSE_FILES="${COMPOSE_FILES_LIST[@]/#/'-f '}" ${DOCKER_COMPOSE} ${COMPOSE_FILES} "$@"