add --register-unsafely-without-email

This commit is contained in:
2024-11-02 16:04:57 +03:00
parent 10e8804de5
commit 3c2506d2cd
2 changed files with 16 additions and 2 deletions

14
docker/docker-compose.yml Normal file
View File

@@ -0,0 +1,14 @@
services:
#Let's Encrypt requires domain's public A/AAAA DNS records pointed at your machine.
certbot:
build:
context: ./docker
dockerfile: Dockerfile
image: bitdeals/certbot
environment:
- DOMAIN=
volumes:
- certificates:/etc/certificates
- letsencrypt:/etc/letsencrypt
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do /opt/scripts/1-renew-cert.sh ; sleep 12h & wait $${!}; done;'"

View File

@@ -11,12 +11,12 @@ if [ ! -f /etc/certificates/site.pem ]; then
fi
if [ -n "$DOMAIN" -a -n "$EMAIL" ]; then
if [ -n "$DOMAIN" ]; then
# Request certificate
certbot certonly --standalone \
--non-interactive --agree-tos --http-01-port=380 \
--email "$EMAIL" \
--register-unsafely-without-email \
--cert-name "$DOMAIN" \
-d "$DOMAIN"