mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 05:28:15 -05: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 {
|
function Docker-Compose-Up {
|
||||||
if (Test-Path -Path "${dockerDir}\docker-compose.override.yml" -PathType leaf) {
|
Docker-Compose-Files
|
||||||
docker-compose -f ${dockerDir}\docker-compose.yml -f ${dockerDir}\docker-compose.override.yml up -d
|
docker-compose up -d
|
||||||
}
|
|
||||||
else {
|
|
||||||
docker-compose -f ${dockerDir}\docker-compose.yml up -d
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Docker-Compose-Down {
|
function Docker-Compose-Down {
|
||||||
if (Test-Path -Path "${dockerDir}\docker-compose.override.yml" -PathType leaf) {
|
Docker-Compose-Files
|
||||||
docker-compose -f ${dockerDir}\docker-compose.yml -f ${dockerDir}\docker-compose.override.yml down
|
docker-compose down
|
||||||
}
|
|
||||||
else {
|
|
||||||
docker-compose -f ${dockerDir}\docker-compose.yml down
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Docker-Compose-Pull {
|
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) {
|
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 {
|
else {
|
||||||
docker-compose -f ${dockerDir}\docker-compose.yml pull
|
$env:COMPOSE_FILE = "${dockerDir}\docker-compose.yml"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Docker-Prune {
|
function Docker-Prune {
|
||||||
|
@ -103,29 +103,26 @@ function install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dockerComposeUp() {
|
function dockerComposeUp() {
|
||||||
if [ -f "${DOCKER_DIR}/docker-compose.override.yml" ]
|
dockerComposeFiles
|
||||||
then
|
docker-compose up -d
|
||||||
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() {
|
function dockerComposeDown() {
|
||||||
if [ -f "${DOCKER_DIR}/docker-compose.override.yml" ]
|
dockerComposeFiles
|
||||||
then
|
docker-compose down
|
||||||
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() {
|
function dockerComposePull() {
|
||||||
|
dockerComposeFiles
|
||||||
|
docker-compose pull
|
||||||
|
}
|
||||||
|
|
||||||
|
function dockerComposeFiles() {
|
||||||
if [ -f "${DOCKER_DIR}/docker-compose.override.yml" ]
|
if [ -f "${DOCKER_DIR}/docker-compose.override.yml" ]
|
||||||
then
|
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
|
else
|
||||||
docker-compose -f $DOCKER_DIR/docker-compose.yml pull
|
export COMPOSE_FILE="$DOCKER_DIR/docker-compose.yml"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user