【问题标题】:How can I trigger container restart when lets-encrypt-nginx-proxy-companion renews my certificate当letsencrypt-nginx-proxy-companion更新我的证书时如何触发容器重启
【发布时间】:2018-06-06 13:54:23
【问题描述】:

docker-lets-encrypt-nginx-proxy-companion 更新 SSL 证书时如何触发我的自定义容器重启?

对于任何可能会问的人,我的自定义容器不是由通过com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy 标签与 docker-lets-encrypt-nginx-proxy-companion 连接的 nginx 容器代理的。这是一个单独的服务,需要重新加载以处理证书更新。

【问题讨论】:

    标签: docker lets-encrypt


    【解决方案1】:

    Certbot 支持更新前和更新后的命令。示例:

    certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"
    

    这里是 certbot 和容器文档的链接:

    Restart container when certificate is renewed

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-12-31
      • 2020-05-03
      • 1970-01-01
      • 2021-06-12
      • 1970-01-01
      • 1970-01-01
      • 2020-10-07
      相关资源
      最近更新 更多