add optional e-mail
This commit is contained in:
@@ -7,6 +7,7 @@ services:
|
|||||||
image: bitdeals/certbot
|
image: bitdeals/certbot
|
||||||
environment:
|
environment:
|
||||||
- DOMAIN=
|
- DOMAIN=
|
||||||
|
- EMAIL=
|
||||||
volumes:
|
volumes:
|
||||||
- certificates:/etc/certificates
|
- certificates:/etc/certificates
|
||||||
- letsencrypt:/etc/letsencrypt
|
- letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@@ -10,13 +10,19 @@ if [ ! -f /etc/certificates/site.pem ]; then
|
|||||||
cat site.key site.crt >> /etc/certificates/site.pem
|
cat site.key site.crt >> /etc/certificates/site.pem
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check e-mail for letsencrypt notifications
|
||||||
|
if [ -n "$EMAIL" ]; then
|
||||||
|
CERTBOT_OPTS="--email $EMAIL"
|
||||||
|
else
|
||||||
|
CERTBOT_OPTS="--register-unsafely-without-email"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$DOMAIN" ]; then
|
if [ -n "$DOMAIN" ]; then
|
||||||
|
|
||||||
# Request certificate
|
# Request certificate
|
||||||
certbot certonly --standalone \
|
certbot certonly --standalone \
|
||||||
--non-interactive --agree-tos --http-01-port=380 \
|
--non-interactive --agree-tos --http-01-port=380 \
|
||||||
--register-unsafely-without-email \
|
"$CERTBOT_OPTS" \
|
||||||
--cert-name "$DOMAIN" \
|
--cert-name "$DOMAIN" \
|
||||||
-d "$DOMAIN"
|
-d "$DOMAIN"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user