From 5ec2a86d086253d89b2b2bf29ff0faac9ff6ba21 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Sat, 20 Aug 2022 15:46:19 +0100 Subject: [PATCH] Added certbot directory for nginx to serve renewal --- docker-compose.yml | 3 ++- nginx/certbot-challenge.conf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 634e11f..2c9b6cf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/nginx/certbot-challenge.conf b/nginx/certbot-challenge.conf index 80f60d6..81ca7f7 100644 --- a/nginx/certbot-challenge.conf +++ b/nginx/certbot-challenge.conf @@ -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"; } \ No newline at end of file