From fae34f1ee396e15eb16842acd61b6d7519a955ea Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 26 Aug 2017 22:36:25 -0400 Subject: [PATCH] added pull when starting --- scripts/run.ps1 | 9 +++++++++ scripts/run.sh | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/scripts/run.ps1 b/scripts/run.ps1 index a84bfacc38..607b21a6a4 100644 --- a/scripts/run.ps1 +++ b/scripts/run.ps1 @@ -4,6 +4,7 @@ param ( [switch] $start, [switch] $restart, [switch] $stop, + [switch] $pull, [switch] $updatedb ) @@ -24,6 +25,10 @@ function Docker-Compose-Down { docker-compose -f ${dockerDir}\docker-compose.yml -f ${dockerDir}\docker-compose.macwin.yml down } +function Docker-Compose-Pull { + docker-compose -f ${dockerDir}\docker-compose.yml -f ${dockerDir}\docker-compose.macwin.yml pull +} + function Docker-Prune { docker image prune -f } @@ -50,11 +55,15 @@ function Print-Environment { if($start -Or $restart) { Docker-Compose-Down + Docker-Compose-Pull Update-Lets-Encrypt Docker-Compose-Up Docker-Prune Print-Environment } +elseif($pull) { + Docker-Compose-Pull +} elseif($stop) { Docker-Compose-Down } diff --git a/scripts/run.sh b/scripts/run.sh index 98dafd7ee1..d68c89304b 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -33,6 +33,10 @@ function dockerComposeDown() { docker-compose -f $DOCKER_DIR/docker-compose.yml -f $DOCKER_DIR/docker-compose.$OS.yml down } +function dockerComposePull() { + docker-compose -f $DOCKER_DIR/docker-compose.yml -f $DOCKER_DIR/docker-compose.$OS.yml pull +} + function dockerPrune() { docker image prune -f } @@ -61,10 +65,14 @@ function printEnvironment() { if [ "$1" == "start" -o "$1" == "restart" ] then dockerComposeDown + dockerComposePull updateLetsEncrypt dockerComposeUp dockerPrune printEnvironment +elif [ "$1" == "pull" ] +then + dockerComposePull elif [ "$1" == "stop" ] then dockerComposeDown