Added certbot directory for nginx to serve renewal

This commit is contained in:
Vivek Santayana 2022-08-20 15:46:19 +01:00
parent cd57eca7d3
commit 5ec2a86d08
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ services:
volumes:
- ./certbot:/etc/letsencrypt:ro
- ./nginx:/etc/nginx
- ./src/html/certbot:/usr/share/nginx/html/certbot:ro
- ./src/html/robots.txt:/usr/share/nginx/html/robots.txt:ro
- ./ref-test/app/root:/usr/share/nginx/html/root:ro
- ./ref-test/app/admin/static:/usr/share/nginx/html/admin/static:ro
@ -60,7 +61,7 @@ services:
image: certbot/certbot
volumes:
- ./certbot:/etc/letsencrypt
- ./src/html:/var/www/html
- ./src/html/certbot:/var/www/html
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:

View File

@ -1,6 +1,6 @@
# Certbot Renewal
location ^~ /.well-known/acme-challenge/ {
root /usr/share/nginx/html;
root /usr/share/nginx/html/certbot;
allow all;
default_type "text/plain";
}