首页 > 解决方案 > traefik tls cli parameters

问题描述

Are there cli parameters for file parameters certFile and keyFile for docker:

[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"

I need it because I can not use let's encript and I have wildcard sertificate (*.domain.com) which I want to use.

Thank you.

标签: dockertraefik

解决方案


来自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


推荐阅读