add Dockerfile into certbot, hardcod the port for certbot into nginx.conf file
This commit is contained in:
@@ -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"]
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user