docker - 扩展参数 certbot 没有交互式问题;只是扩展它
问题描述
我正在使用 nginx 和 certbot。为了管理两者,我使用docker-compose
. 这是我使用的 * .yml。
version: "3"
# Services
services:
# certbot
certbot:
image: certbot/certbot:latest
container_name: warehouse-certbot
command: certonly --webroot --webroot-path=/var/www/certbot --email ahmadfadlydziljalal@gmail.com --agree-tos --no-eff-email -d tsurumaru.online -d backend.tsurumaru.online -d www.tsurumaru.online --expand
volumes:
- ./docker/nginx/certbot/conf:/etc/letsencrypt
- ./docker/nginx/certbot/logs:/var/log/letsencrypt
- ./docker/nginx/certbot/data:/var/www/certbot
# Web Server Service
nginx:
image: "${REGISTRY_HOST}/warehouse-nginx"
build:
context: "./docker/nginx"
dockerfile: "Dockerfile"
container_name: warehouse-nginx
ports:
- "80:80" # backend dan frontend di port 80, yang bermain adalah domain dan subdomain
- "443:443" # Untuk https
volumes:
- ./:/var/www/html
- ./docker/nginx/conf.d/default.prod.conf:/etc/nginx/conf.d/default.conf:ro # OVERRIDE
- ./docker/nginx/certbot/conf:/etc/nginx/ssl
- ./docker/nginx/certbot/data:/var/www/certbot
depends_on:
- php
networks:
- warehouse-network
随着 docker-compose up,nginx 正在运行,但是如果我在 cerbot 容器中看到它说:
You have an existing certificate that contains a portion of the domains you
requested (ref: /etc/letsencrypt/renewal/tsurumaru.online.conf)
It contains these names: tsurumaru.online, www.tsurumaru.online
You requested these names for the new certificate: tsurumaru.online,
backend.tsurumaru.online, www.tsurumaru.online.
Do you want to expand and replace this existing certificate with the new
certificate?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
An unexpected error occurred:
EOFError
Please see the logfiles in /var/log/letsencrypt for more details.
(E)xpand/(C)ancel:
如何传递扩展值?如您所见,我已经写了--expand
,但仍然失败:
certonly --webroot --webroot-path=/var/www/certbot
--email ahmadfadlydziljalal@gmail.com
--agree-tos --no-eff-email
-d tsurumaru.online
-d backend.tsurumaru.online
-d www.tsurumaru.online
--expand
解决方案
推荐阅读
- java - Spring Boot 应用程序有多个实例,但只有一个实例应该使用来自 RabbitMQ 的消息
- javascript - 循环内的 addEventListener 未定义 div 元素
- python - 在熊猫中创建数据透视表
- flutter - 从一次仅返回 50 个结果的 API 在 Flutter 中解析 JSON
- python - wfastcgi-enable 它显示“确保您的用户有足够的权限,然后再试一次。”
- javascript - 如何在反应中设置渲染器上的 yup 验证
- c++ - 内存映射文件只读时是否需要互斥锁?
- javascript - 尝试获取输入值时未定义
- java - java.lang.ClassCastException:java.util.LinkedHashMap 无法转换为 java.lang.String
- java - 为什么在 android 的 sp 中设置文本大小时,静态布局对不同的屏幕密度没有响应?