change variable names
This commit is contained in:
@@ -7,8 +7,8 @@ services:
|
|||||||
image: registry.bitdeals.org/certbot
|
image: registry.bitdeals.org/certbot
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- DOMAIN=
|
- CERTBOT_DOMAIN=
|
||||||
- EMAIL= # optional for notifications
|
- CERTBOT_EMAIL= # optional for notifications
|
||||||
volumes:
|
volumes:
|
||||||
- certificates:/etc/certificates
|
- certificates:/etc/certificates
|
||||||
- letsencrypt:/etc/letsencrypt
|
- letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@@ -11,20 +11,20 @@ if [ ! -f /etc/certificates/site.pem ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# check e-mail for letsencrypt notifications
|
# check e-mail for letsencrypt notifications
|
||||||
if [ -n "$EMAIL" ]; then
|
if [ -n "$CERTBOT_EMAIL" ]; then
|
||||||
CERTBOT_OPTS="--email $EMAIL"
|
CERTBOT_OPTS="--email $CERTBOT_EMAIL"
|
||||||
else
|
else
|
||||||
CERTBOT_OPTS="--register-unsafely-without-email"
|
CERTBOT_OPTS="--register-unsafely-without-email"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$DOMAIN" ]; then
|
if [ -n "$CERTBOT_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 \
|
||||||
"$CERTBOT_OPTS" \
|
"$CERTBOT_OPTS" \
|
||||||
--cert-name "$DOMAIN" \
|
--cert-name "$CERTBOT_DOMAIN" \
|
||||||
-d "$DOMAIN"
|
-d "$CERTBOT_DOMAIN"
|
||||||
|
|
||||||
# Concatenate certificates
|
# Concatenate certificates
|
||||||
. $(dirname $0)/2-concatenate-cert.sh
|
. $(dirname $0)/2-concatenate-cert.sh
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Certificates exist
|
# Certificates exist
|
||||||
if [ -n "$DOMAIN" -a -d /etc/letsencrypt/live/"$DOMAIN" ]; then
|
if [ -n "$CERTBOT_DOMAIN" -a -d /etc/letsencrypt/live/"$CERTBOT_DOMAIN" ]; then
|
||||||
# Check certificates and renew them
|
# Check certificates and renew them
|
||||||
certbot renew --http-01-port=380
|
certbot renew --http-01-port=380
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cd /etc/letsencrypt/live/"$DOMAIN"
|
cd /etc/letsencrypt/live/"$CERTBOT_DOMAIN"
|
||||||
|
|
||||||
if [ -f fullchain.pem -a -f privkey.pem ]; then
|
if [ -f fullchain.pem -a -f privkey.pem ]; then
|
||||||
cat fullchain.pem privkey.pem > /etc/certificates/site.pem
|
cat fullchain.pem privkey.pem > /etc/certificates/site.pem
|
||||||
|
|||||||
Reference in New Issue
Block a user