Traefik : Let's Encrypt + other certificate

I have 3 nodes swarm and I wish to use TRAEFIK with Let’sEncryp and my own certificates generated by the company www.tbs-internet.com. Is it possible? Currently it works with Let’s Encrypt but not with my other certificates.
With the configuration files, I have the following error in the logs of Traefik:

time="2017-07-05T12:07:57Z" level=info msg="Preparing server http &{Network: Address::80 TLS:<nil> Redirect:<nil> Auth:0xc420339360 Compress:false}"
time="2017-07-05T12:07:57Z" level=info msg="Preparing server https &{Network: Address::443 TLS:0xc4204fe600 Redirect:<nil> Auth:0xc4203396c0 Compress:false}"
time="2017-07-05T12:07:57Z" level=info msg="Starting server on :80"
time="2017-07-05T12:07:57Z" level=error msg="Error creating TLS config: tls: failed to parse private key"
time="2017-07-05T12:07:57Z" level=fatal msg="Error preparing server: tls: failed to parse private key"

traefik.toml

defaultEntryPoints = ["http", "https"]

[entryPoints]
 [entryPoints.http]
 address = ":80"
 [entryPoints.https]
 address = ":443"
  [entryPoints.https.tls]
   [[entryPoints.https.tls.certificates]]
   CertFile = "/tls/fs/preprod.appx.mydomainA.com.cert"
   KeyFile = "/tls/fs/preprod.appx.mydomainA.com.key"

[acme]
email = "xxxxxxxxxxxxxxxxxxx"
storage = "acme.json"
entryPoint = "https"
onDemand = true

[[acme.domains]]
 main = "admin.mydomainC.com"

[web]
address = ":8080"

docker-compose.yml for Traefik

version: '3'

services:
  proxy-prod:
    image: traefik:v1.3.1-alpine
    command: --web --docker --docker.swarmmode --docker.domain=traefik.admin.mydomainC.com --docker.watch --logLevel=DEBUG
    networks:
      - net-prod
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - $PWD/traefik.toml:/traefik.toml
      - "/home/swarm/ssl:/tls"
    deploy:
      mode: global

networks:
 net-prod:
  driver: overlay
  external:
   name: net-prod

docker-compose.yml for app1

version: '3'

networks:
 net-prod:
  driver: overlay
  external:
   name: net-prod

services:
  app1:
    image: private/app1
    networks:
      - net-prod
    deploy:
      labels:
        - "traefik.backend=app1"
        - "traefik.frontend.rule=Host:app1.app.mydomainC.com,preprod.appx.mydomainA.com"
        - "traefik.docker.network=net-prod"
        - "traefik.port=9001"
      replicas: 1

Do you have an idea ?

  • Wildcard subdomain works on Docker CLI but not on Docker-Swarm with Docker-Compose
  • Can't start docker-compose with systemd: “aufs au_opts_verify: dirperm1 breaks the protection by the permission bits on the lower branch” error
  • Best practice for rails docker-compose db:create db:migrate
  • Populate Cassandra Db using Docker
  • How to get memory usage of processes running in docker container?
  • ERR_EMPTY_RESPONSE in process of Sentry installation with Docker inside VirtualBox
  • The app1 service have two URLs :

    • app1.app.mydomainC.com : with Let’s Encrypt
    • preprod.appx.mydomainA.com : my own certificates generated by the company www.tbs-internet.com

  • Automatic push to a Docker private registry
  • Docker can't connect to the internet from with proxy
  • How to get container id of running container programmatically (on Docker)?
  • Docker npm install fails
  • Consul not deregistering zombie services
  • Docker how to use boolean value on spec.container.env.value
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.