add Dockerfile into certbot, hardcod the port for certbot into nginx.conf file

This commit is contained in:
2025-05-28 13:12:12 +03:00
parent be0c9ed5a1
commit d264153f46
2 changed files with 17 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
# certbot/Dockerfile
FROM certbot/certbot:latest
# Опционально: можно установить дополнительные пакеты, если нужно
# RUN apk add --no-cache some-package
# Копируем env файл (альтернатива - передавать через docker-compose)
# COPY .env /tmp/.env
# Копируем скрипт инициализации (если используется)
# COPY certbot-init.sh /opt/
# RUN chmod +x /opt/certbot-init.sh
# Указываем точку входа (можно и через command в compose)
ENTRYPOINT ["sh", "-c"]
CMD ["certbot certonly --standalone -p ${CERTBOT_PORT} --noninteractive --agree-tos --email ${EMAIL} -d ${DOMAINS} --keep-until-expiring"]
+1 -1
View File
@@ -58,7 +58,7 @@ server {
# HTTP for certbot ssl certificate alterante port
server {
listen ${CERTBOT_PORT}; # альтернативный порт для Certbot
listen 333; # альтернативный порт для Certbot
location ~ /.well-known {
allow all;
}