【问题标题】:Traefik SSL without let's encryptTraefik SSL 没有让我们加密
【发布时间】:2017-12-03 07:56:13
【问题描述】:

有没有一种方法可以使用 traefik(使用 docker swarm)和 SSL,而无需“让我们加密”。

Let's encrypt 支持非常棒 (https://docs.traefik.io/user-guide/docker-and-lets-encrypt),但我不需要 letencrypt,因为我们在组织中运行自己的 CA。

有没有办法简单地将证书(.crt 和 .key)放在某个地方,因为我们不需要生成它们(在文件夹中或作为机密)。你知道怎么做吗?

我们想做一个非常基本的设置,并在 swarm 集群中有一些容器,我们希望按域定位它们,例如:https://foo.ourdomain.comhttps://bar.ourdomain.com

感谢您的帮助!

【问题讨论】:

    标签: ssl traefik


    【解决方案1】:

    您可以为 traefik 挂载卷:

      - ${USERDIR}/docker/traefik/acme/yourcrt.crt:/yourcrt.crt
      - ${USERDIR}/docker/traefik/acme/yourcrt.key:/yourcrt.key
    

    在您的 docker-compose 中并在 traffic.toml 中引用它:

    [entryPoints]
      [entryPoints.http]
      address = ":80"
       [entryPoints.http.redirect]
         entryPoint = "https"
       [entryPoints.https]
         address = ":443"
          [entryPoints.https.tls]
          [[entryPoints.https.tls.certificates]]
          certFile = "/yourcrt.crt"
          keyFile = "/yourcrt.key"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-21
      • 2021-09-08
      • 1970-01-01
      • 2021-10-22
      • 1970-01-01
      • 1970-01-01
      • 2018-04-23
      • 1970-01-01
      相关资源
      最近更新 更多