mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
Allow usage of default override file (#210)
* Updated run.sh to support default override This is equivalent to run docker-compose in the directory of the project (here "docker"). See: https://docs.docker.com/compose/extends/ Override allows to change some paramaters and extend the original compose file to your own environment (network config, CPU/RAM caps,...) * Updated run.ps1 to support docker override file Same as run.sh * Added conditionals for override file absence I misunderstood the documentation, that file must exist if file is specified on command line, added conditionals to support that case * Update run.ps1 to test for override file presence Same as .sh
This commit is contained in:

committed by
Kyle Spearrin

parent
5a9923092a
commit
fefda383d1
@ -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() {
|
||||
|
Reference in New Issue
Block a user