diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 5099b23a73..60be6e8f9c 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -19,12 +19,14 @@ if($domain -ne "localhost") { if(!(Test-Path -Path $letsEncryptPath )){ New-Item -ItemType directory -Path $letsEncryptPath | Out-Null } + docker pull certbot/certbot docker run -it --rm --name certbot -p 80:80 -v $outputDir/letsencrypt:/etc/letsencrypt/ certbot/certbot ` certonly --standalone --noninteractive --agree-tos --preferred-challenges http --email $email -d $domain ` --logs-dir /etc/letsencrypt/logs } } +docker pull bitwarden/setup docker run -it --rm --name setup -v ${outputDir}:/bitwarden bitwarden/setup ` dotnet Setup.dll -install 1 -domain ${domain} -letsencrypt ${letsEncrypt} diff --git a/scripts/install.sh b/scripts/install.sh index 56a8460bb5..4b1475c138 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -19,12 +19,14 @@ then then read -p "(!) Enter your email address (Let's Encrypt will send you certificate expiration reminders): " EMAIL mkdir -p $OUTPUT_DIR/letsencrypt + docker pull certbot/certbot docker run -it --rm --name certbot -p 80:80 -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \ certonly --standalone --noninteractive --agree-tos --preferred-challenges http --email $EMAIL -d $DOMAIN \ --logs-dir /etc/letsencrypt/logs fi fi +docker pull bitwarden/setup docker run -it --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup \ dotnet Setup.dll -install 1 -domain $DOMAIN -letsencrypt $LETS_ENCRYPT diff --git a/scripts/run.ps1 b/scripts/run.ps1 index 607b21a6a4..af580aa8e2 100644 --- a/scripts/run.ps1 +++ b/scripts/run.ps1 @@ -35,18 +35,21 @@ function Docker-Prune { function Update-Lets-Encrypt { if(Test-Path -Path "${outputDir}\letsencrypt\live") { + docker pull certbot/certbot docker run -it --rm --name certbot -p 443:443 -p 80:80 -v $outputDir/letsencrypt:/etc/letsencrypt/ certbot/certbot ` renew --logs-dir /etc/letsencrypt/logs } } function Update-Database { + docker pull bitwarden/setup docker run -it --rm --name setup --network container:mssql -v ${outputDir}:/bitwarden bitwarden/setup ` dotnet Setup.dll -update 1 -db 1 echo "Database update complete" } function Print-Environment { + docker pull bitwarden/setup docker run -it --rm --name setup -v ${outputDir}:/bitwarden bitwarden/setup ` dotnet Setup.dll -printenv 1 -env win } diff --git a/scripts/run.sh b/scripts/run.sh index d68c89304b..2107ed2da6 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -44,18 +44,21 @@ function dockerPrune() { function updateLetsEncrypt() { if [ -d "${outputDir}/letsencrypt/live" ] then + docker pull certbot/certbot docker run -it --rm --name certbot -p 443:443 -p 80:80 -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \ renew --logs-dir /etc/letsencrypt/logs fi } function updateDatabase() { + docker pull bitwarden/setup docker run -it --rm --name setup --network container:mssql -v $OUTPUT_DIR:/bitwarden bitwarden/setup \ dotnet Setup.dll -update 1 -db 1 echo "Database update complete" } function printEnvironment() { + docker pull bitwarden/setup docker run -it --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup \ dotnet Setup.dll -printenv 1 -env $OS }