1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

added pull when starting

This commit is contained in:
Kyle Spearrin 2017-08-26 22:36:25 -04:00
parent f7fd4dec96
commit fae34f1ee3
2 changed files with 17 additions and 0 deletions

View File

@ -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
}

View File

@ -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