traefik tls cli参数

时间:2019-09-12 09:30:53

标签: docker traefik

是否存在用于docker的文件参数certFile和keyFile的cli参数:

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

我需要它,因为我不能使用加密功能,而我要使用通配符(* .domain.com)。

谢谢。

1 个答案:

答案 0 :(得分:0)

来自https://community.containo.us/t/traefik-tls-cli-parameters/1564

你好

您必须使用CLI定义入口点:

traefik:
  image: traefik:v1.7.14
  command:
    - "--entryPoints=Name:http Address::80 Redirect.EntryPoint:https"
    - "--entryPoints=Name:https Address::443 TLS:/examples/traefik.crt,/examples/traefik.key"
# ...

https://docs.traefik.io/v1.7/configuration/entrypoints/#all-available-options