From 51b0b3803e4a30f9465d3c74c5cb9f8ac9b5e438 Mon Sep 17 00:00:00 2001 From: Alex B Date: Fri, 13 Dec 2024 00:21:24 -0500 Subject: [PATCH] fix: discovered a post-hook error '/bin/sh: nginx: not found' and modified the renew command to use the full path to nginx in the nginx container --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 50b3cdb..ffd91fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,7 +57,7 @@ services: - -c - | touch /var/log/letsencrypt/renewal.log - echo "0 */12 * * * certbot renew --webroot -w /var/www/certbot --quiet --post-hook 'docker exec -i nginx nginx -s reload' >> /var/log/letsencrypt/renewal.log 2>&1" | + echo "0 */12 * * * certbot renew --webroot -w /var/www/certbot --quiet --post-hook 'docker exec -i nginx /usr/sbin/nginx -s reload'" | crontab - && crond -f volumes: - ./certbot/conf:/etc/letsencrypt