1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 00:22:50 -05:00

renew lets encrypt cert on run

This commit is contained in:
Kyle Spearrin
2017-08-21 11:21:40 -04:00
parent 2cfea467d1
commit a0a5bffec9
6 changed files with 52 additions and 22 deletions

View File

@ -1,5 +1,6 @@
param (
[string] $dockerDir = ""
[string]$outputDir = "../.",
[string]$dockerDir = ""
)
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path
@ -10,5 +11,11 @@ if($dockerDir -eq "") {
docker --version
docker-compose --version
$letsEncryptLivePath = "${outputDir}/letsencrypt/live"
if(Test-Path -Path $letsEncryptLivePath) {
docker run -it --rm --name certbot -p 443:443 -p 80:80 -v $outputDir/letsencrypt:/etc/letsencrypt/ certbot/certbot `
renew
}
docker-compose -f ${dockerDir}\docker-compose.yml -f ${dockerDir}\docker-compose.macwin.yml down
docker-compose -f ${dockerDir}\docker-compose.yml -f ${dockerDir}\docker-compose.macwin.yml up -d