diff --git a/scripts/run.ps1 b/scripts/run.ps1 index 579c731a4c..5cd9c2fd6b 100644 --- a/scripts/run.ps1 +++ b/scripts/run.ps1 @@ -17,15 +17,31 @@ $dockerDir="${outputDir}\docker" # Functions function Docker-Compose-Up { - docker-compose -f ${dockerDir}\docker-compose.yml up -d + if(Test-Path -Path "${dockerDir}\docker-compose.override.yml" -PathType leaf) { + docker-compose -f ${dockerDir}\docker-compose.yml -f ${dockerDir}\docker-compose.override.yml up -d + } + else { + docker-compose -f ${dockerDir}\docker-compose.yml up -d + } } function Docker-Compose-Down { - docker-compose -f ${dockerDir}\docker-compose.yml down + if(Test-Path -Path "${dockerDir}\docker-compose.override.yml" -PathType leaf) { + docker-compose -f ${dockerDir}\docker-compose.yml -f ${dockerDir}\docker-compose.override.yml down + } + else { + docker-compose -f ${dockerDir}\docker-compose.yml down + } } function Docker-Compose-Pull { - docker-compose -f ${dockerDir}\docker-compose.yml pull + if(Test-Path -Path "${dockerDir}\docker-compose.override.yml" -PathType leaf) { + docker-compose -f ${dockerDir}\docker-compose.yml -f ${dockerDir}\docker-compose.override.yml pull + } + else { + docker-compose -f ${dockerDir}\docker-compose.yml pull + } + } function Docker-Prune { diff --git a/scripts/run.sh b/scripts/run.sh index de78e8cf1c..e89b228eeb 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -34,15 +34,30 @@ DOCKER_DIR="$OUTPUT_DIR/docker" # Functions function dockerComposeUp() { - docker-compose -f $DOCKER_DIR/docker-compose.yml up -d + if [ -f "$DOCKER_DIR/docker-compose.override.yml" ] + then + docker-compose -f $DOCKER_DIR/docker-compose.yml -f $DOCKER_DIR/docker-compose.override.yml up -d + else + docker-compose -f $DOCKER_DIR/docker-compose.yml up -d + fi } function dockerComposeDown() { - docker-compose -f $DOCKER_DIR/docker-compose.yml down + if [ -f "$DOCKER_DIR/docker-compose.override.yml" ] + then + docker-compose -f $DOCKER_DIR/docker-compose.yml -f $DOCKER_DIR/docker-compose.override.yml down + else + docker-compose -f $DOCKER_DIR/docker-compose.yml down + fi } function dockerComposePull() { - docker-compose -f $DOCKER_DIR/docker-compose.yml pull + if [ -f "$DOCKER_DIR/docker-compose.override.yml" ] + then + docker-compose -f $DOCKER_DIR/docker-compose.yml -f $DOCKER_DIR/docker-compose.override.yml pull + else + docker-compose -f $DOCKER_DIR/docker-compose.yml pull + fi } function dockerPrune() {