nginx and certbot into containers is start and renew certs by auto
This commit is contained in:
+9
-12
@@ -1,16 +1,13 @@
|
||||
# certbot/Dockerfile
|
||||
FROM certbot/certbot:latest
|
||||
FROM certbot/certbot
|
||||
|
||||
# Опционально: можно установить дополнительные пакеты, если нужно
|
||||
# RUN apk add --no-cache some-package
|
||||
# Создаем директории для конфигов
|
||||
RUN mkdir -p /etc/letsencrypt/config
|
||||
|
||||
# Копируем env файл (альтернатива - передавать через docker-compose)
|
||||
# COPY .env /tmp/.env
|
||||
# Копируем конфигурационные файлы
|
||||
COPY config/certbot.ini /etc/letsencrypt/config/
|
||||
COPY scripts/init-certbot.sh /opt/
|
||||
|
||||
# Копируем скрипт инициализации (если используется)
|
||||
# COPY certbot-init.sh /opt/
|
||||
# RUN chmod +x /opt/certbot-init.sh
|
||||
# Устанавливаем права
|
||||
RUN chmod +x /opt/init-certbot.sh
|
||||
|
||||
# Указываем точку входа (можно и через command в compose)
|
||||
ENTRYPOINT ["sh", "-c"]
|
||||
CMD ["certbot certonly --standalone --http-01-port ${CERTBOT_PORT} --noninteractive --agree-tos --email ${EMAIL} -d ${DOMAINS} --keep-until-expiring"]
|
||||
ENTRYPOINT ["/opt/init-certbot.sh"]
|
||||
|
||||
Reference in New Issue
Block a user