mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 05:28:15 -05:00
tag setup
This commit is contained in:
parent
0ad9e5a217
commit
f2ae8bc132
@ -2,6 +2,8 @@ param (
|
|||||||
[string]$outputDir = "../."
|
[string]$outputDir = "../."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
[string]$tag = "1.12.0"
|
||||||
|
|
||||||
if(!(Test-Path -Path $outputDir )){
|
if(!(Test-Path -Path $outputDir )){
|
||||||
New-Item -ItemType directory -Path $outputDir | Out-Null
|
New-Item -ItemType directory -Path $outputDir | Out-Null
|
||||||
}
|
}
|
||||||
@ -26,8 +28,8 @@ if($domain -ne "localhost") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
docker pull bitwarden/setup
|
docker pull bitwarden/setup:$tag
|
||||||
docker run -it --rm --name setup -v ${outputDir}:/bitwarden bitwarden/setup `
|
docker run -it --rm --name setup -v ${outputDir}:/bitwarden bitwarden/setup:$tag `
|
||||||
dotnet Setup.dll -install 1 -domain ${domain} -letsencrypt ${letsEncrypt}
|
dotnet Setup.dll -install 1 -domain ${domain} -letsencrypt ${letsEncrypt}
|
||||||
|
|
||||||
echo "Setup complete"
|
echo "Setup complete"
|
||||||
|
@ -6,6 +6,9 @@ if [ $# -eq 1 ]
|
|||||||
then
|
then
|
||||||
OUTPUT_DIR=$1
|
OUTPUT_DIR=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
TAG="1.12.0"
|
||||||
|
|
||||||
mkdir -p $OUTPUT_DIR
|
mkdir -p $OUTPUT_DIR
|
||||||
|
|
||||||
LETS_ENCRYPT="n"
|
LETS_ENCRYPT="n"
|
||||||
@ -26,8 +29,8 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker pull bitwarden/setup
|
docker pull bitwarden/setup:$TAG
|
||||||
docker run -it --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup \
|
docker run -it --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup:$TAG \
|
||||||
dotnet Setup.dll -install 1 -domain $DOMAIN -letsencrypt $LETS_ENCRYPT
|
dotnet Setup.dll -install 1 -domain $DOMAIN -letsencrypt $LETS_ENCRYPT
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -10,6 +10,8 @@ param (
|
|||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
|
|
||||||
|
[string]$tag = "1.12.0"
|
||||||
|
|
||||||
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
if($dockerDir -eq "") {
|
if($dockerDir -eq "") {
|
||||||
$dockerDir="${dir}\..\docker"
|
$dockerDir="${dir}\..\docker"
|
||||||
@ -42,15 +44,15 @@ function Update-Lets-Encrypt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Update-Database {
|
function Update-Database {
|
||||||
docker pull bitwarden/setup
|
docker pull bitwarden/setup:$tag
|
||||||
docker run -it --rm --name setup --network container:mssql -v ${outputDir}:/bitwarden bitwarden/setup `
|
docker run -it --rm --name setup --network container:mssql -v ${outputDir}:/bitwarden bitwarden/setup:$tag `
|
||||||
dotnet Setup.dll -update 1 -db 1
|
dotnet Setup.dll -update 1 -db 1
|
||||||
echo "Database update complete"
|
echo "Database update complete"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Print-Environment {
|
function Print-Environment {
|
||||||
docker pull bitwarden/setup
|
docker pull bitwarden/setup:$tag
|
||||||
docker run -it --rm --name setup -v ${outputDir}:/bitwarden bitwarden/setup `
|
docker run -it --rm --name setup -v ${outputDir}:/bitwarden bitwarden/setup:$tag `
|
||||||
dotnet Setup.dll -printenv 1 -env win
|
dotnet Setup.dll -printenv 1 -env win
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ then
|
|||||||
OS="mac"
|
OS="mac"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
TAG="1.12.0"
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
function dockerComposeUp() {
|
function dockerComposeUp() {
|
||||||
@ -51,15 +53,15 @@ function updateLetsEncrypt() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateDatabase() {
|
function updateDatabase() {
|
||||||
docker pull bitwarden/setup
|
docker pull bitwarden/setup:$TAG
|
||||||
docker run -it --rm --name setup --network container:mssql -v $OUTPUT_DIR:/bitwarden bitwarden/setup \
|
docker run -it --rm --name setup --network container:mssql -v $OUTPUT_DIR:/bitwarden bitwarden/setup:$TAG \
|
||||||
dotnet Setup.dll -update 1 -db 1
|
dotnet Setup.dll -update 1 -db 1
|
||||||
echo "Database update complete"
|
echo "Database update complete"
|
||||||
}
|
}
|
||||||
|
|
||||||
function printEnvironment() {
|
function printEnvironment() {
|
||||||
docker pull bitwarden/setup
|
docker pull bitwarden/setup:$TAG
|
||||||
docker run -it --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup \
|
docker run -it --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup:$TAG \
|
||||||
dotnet Setup.dll -printenv 1 -env $OS
|
dotnet Setup.dll -printenv 1 -env $OS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user