nginx and certbot into containers is start and renew certs by auto

This commit is contained in:
2025-05-31 19:54:35 +03:00
parent 81fd806691
commit 89d6d62f12
15 changed files with 433 additions and 345 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
# Проверяем наличие сертификатов
if [ ! -d "/etc/letsencrypt/live/${DOMAINS}" ]; then
echo "Получаем новые сертификаты..."
certbot certonly --webroot \
--config /etc/letsencrypt/config/certbot.ini \
-w /var/www/certbot \
-d ${DOMAINS}
fi
# Бесконечный цикл для обновления сертификатов
while :; do
echo "Проверяем необходимость обновления..."
certbot renew
sleep 12h
done