mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +01:00
path adjustments for lets encrypt
This commit is contained in:
parent
5fe587ea9f
commit
e90dc470b7
@ -18,13 +18,13 @@ if($domain -ne "localhost") {
|
|||||||
if($letsEncrypt -eq "y") {
|
if($letsEncrypt -eq "y") {
|
||||||
[string]$email = $( Read-Host "(!) Enter your email address (Let's Encrypt will send you certificate expiration reminders)" )
|
[string]$email = $( Read-Host "(!) Enter your email address (Let's Encrypt will send you certificate expiration reminders)" )
|
||||||
|
|
||||||
$letsEncryptPath = "${outputDir}/letsencrypt/live/${domain}"
|
$letsEncryptPath = "${outputDir}/letsencrypt"
|
||||||
if(!(Test-Path -Path $letsEncryptPath )){
|
if(!(Test-Path -Path $letsEncryptPath )){
|
||||||
New-Item -ItemType directory -Path $letsEncryptPath | Out-Null
|
New-Item -ItemType directory -Path $letsEncryptPath | Out-Null
|
||||||
}
|
}
|
||||||
docker run -it --rm --name certbot -p 80:80 -v $outputDir/letsencrypt:/etc/letsencrypt/ 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 `
|
certonly --standalone --noninteractive --agree-tos --preferred-challenges http --email $email -d $domain `
|
||||||
--logs-dir $outputDir/letsencrypt/logs --staging
|
--logs-dir /etc/letsencrypt/logs --staging
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,10 +11,10 @@ if($dockerDir -eq "") {
|
|||||||
docker --version
|
docker --version
|
||||||
docker-compose --version
|
docker-compose --version
|
||||||
|
|
||||||
$letsEncryptLivePath = "${outputDir}/letsencrypt/live"
|
$letsEncryptPath = "${outputDir}/letsencrypt"
|
||||||
if(Test-Path -Path $letsEncryptLivePath) {
|
if(Test-Path -Path $letsEncryptPath) {
|
||||||
docker run -it --rm --name certbot -p 443:443 -p 80:80 -v $outputDir/letsencrypt:/etc/letsencrypt/ certbot/certbot `
|
docker run -it --rm --name certbot -p 443:443 -p 80:80 -v $outputDir/letsencrypt:/etc/letsencrypt/ certbot/certbot `
|
||||||
renew --logs-dir $outputDir/letsencrypt/logs --staging
|
renew --logs-dir /etc/letsencrypt/logs --staging
|
||||||
}
|
}
|
||||||
|
|
||||||
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 down
|
||||||
|
Loading…
Reference in New Issue
Block a user