1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-28 13:15:12 +01:00

lets encrypt updates for sh scripts

This commit is contained in:
Kyle Spearrin 2017-08-21 11:47:42 -04:00
parent e90dc470b7
commit ecf3ce797e
4 changed files with 8 additions and 7 deletions

View File

@ -24,7 +24,7 @@ if($domain -ne "localhost") {
} }
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 /etc/letsencrypt/logs --staging --logs-dir /etc/letsencrypt/logs
} }
} }

View File

@ -21,9 +21,10 @@ then
if [ "$LETS_ENCRYPT" == "y" ] if [ "$LETS_ENCRYPT" == "y" ]
then then
read -p "(!) Enter your email address (Let's Encrypt will send you certificate expiration reminders): " EMAIL read -p "(!) Enter your email address (Let's Encrypt will send you certificate expiration reminders): " EMAIL
mkdir -p $OUTPUT_DIR/letsencrypt/live/$DOMAIN mkdir -p $OUTPUT_DIR/letsencrypt
docker run -it --rm --name certbot -p 80:80 -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ 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 certonly --standalone --noninteractive --agree-tos --preferred-challenges http --email $EMAIL -d $DOMAIN \
--logs-dir /etc/letsencrypt/logs
fi fi
fi fi

View File

@ -14,7 +14,7 @@ docker-compose --version
$letsEncryptPath = "${outputDir}/letsencrypt" $letsEncryptPath = "${outputDir}/letsencrypt"
if(Test-Path -Path $letsEncryptPath) { 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 /etc/letsencrypt/logs --staging renew --logs-dir /etc/letsencrypt/logs
} }
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

View File

@ -24,11 +24,11 @@ fi
docker --version docker --version
docker-compose --version docker-compose --version
LETS_ENCRYPT_LIVE = "${outputDir}/letsencrypt/live" LETS_ENCRYPT_PATH = "${outputDir}/letsencrypt"
if [ -d "$LETS_ENCRYPT_LIVE" ] if [ -d "LETS_ENCRYPT_PATH" ]
then then
docker run -it --rm --name certbot -p 443:443 -p 80:80 -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \ docker run -it --rm --name certbot -p 443:443 -p 80:80 -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \
renew renew --logs-dir /etc/letsencrypt/logs
fi fi
docker-compose -f $DOCKER_DIR/docker-compose.yml -f $DOCKER_DIR/docker-compose.$OS.yml down docker-compose -f $DOCKER_DIR/docker-compose.yml -f $DOCKER_DIR/docker-compose.$OS.yml down