mirror of
https://github.com/bitwarden/server.git
synced 2024-11-22 12:15:36 +01:00
set docker files to env var
This commit is contained in:
parent
7a6d09a28e
commit
d43d0f1446
@ -60,31 +60,27 @@ function Install() {
|
||||
}
|
||||
|
||||
function Docker-Compose-Up {
|
||||
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
|
||||
}
|
||||
Docker-Compose-Files
|
||||
docker-compose up -d
|
||||
}
|
||||
|
||||
function Docker-Compose-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
|
||||
}
|
||||
Docker-Compose-Files
|
||||
docker-compose down
|
||||
}
|
||||
|
||||
function Docker-Compose-Pull {
|
||||
Docker-Compose-Files
|
||||
docker-compose pull
|
||||
}
|
||||
|
||||
function Docker-Compose-Files {
|
||||
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
|
||||
$env:COMPOSE_FILE = "${dockerDir}\docker-compose.yml;${dockerDir}\docker-compose.override.yml"
|
||||
}
|
||||
else {
|
||||
docker-compose -f ${dockerDir}\docker-compose.yml pull
|
||||
$env:COMPOSE_FILE = "${dockerDir}\docker-compose.yml"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Docker-Prune {
|
||||
|
@ -103,29 +103,26 @@ function install() {
|
||||
}
|
||||
|
||||
function dockerComposeUp() {
|
||||
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
|
||||
dockerComposeFiles
|
||||
docker-compose up -d
|
||||
}
|
||||
|
||||
function dockerComposeDown() {
|
||||
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
|
||||
dockerComposeFiles
|
||||
docker-compose down
|
||||
}
|
||||
|
||||
function dockerComposePull() {
|
||||
dockerComposeFiles
|
||||
docker-compose pull
|
||||
}
|
||||
|
||||
function dockerComposeFiles() {
|
||||
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
|
||||
export COMPOSE_FILE="$DOCKER_DIR/docker-compose.yml:$DOCKER_DIR/docker-compose.override.yml"
|
||||
else
|
||||
docker-compose -f $DOCKER_DIR/docker-compose.yml pull
|
||||
export COMPOSE_FILE="$DOCKER_DIR/docker-compose.yml"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user