I try to configure traefik on windows with docker swarm. Everything seen to work properly, except the SSL resolve.
Basicly i configure Treefik like this. It's a labs environement.
# Docker compose file deploy with docker stack version: '3.9' services: traefik: # Use the latest v2.2.x Traefik image available image: traefik:v2.8.3-windowsservercore-1809 ports: # Listen on port 80, default for HTTP, necessary to redirect to HTTPS #- 80:80 # Listen on port 443, default for HTTPS - 443:443 - 8080:8080 deploy: replicas: 1 placement: constraints: - node.hostname==WIN-3LEFVGLVGQ1 # a retirer test seulement volumes: - type: npipe source: \\.\pipe\docker_engine target: \\.\pipe\docker_engine - type: bind source: c:\traefikConfig\ # to put on the san. All the manager node must get the same path target: c:/config_traefik # creer un repertoire sur le container - type: bind source: c:\temp\ssl\ # a mettre sur la SAN target: c:/configuration command: - --configFile=c:/config_traefik/static_traefik.yml networks: # Use the public network created to be shared between Traefik and # any other service that needs to be publicly available with HTTPS - traefik-net
In my "static traefik configuration" it's look like very basic based on sample find on the net.
# Static configuration file api: dashboard: true # Enable the dashboard insecure: true entryPoints: http: address: ":80" # Create the HTTP entrypoint on port 80 http: redirections: # HTTPS redirection (80 to 443) entryPoint: to: "https" # The target element scheme: "https" # The redirection target scheme https: address: ":443" # Create the HTTPS entrypoint on port 443 providers: docker: endpoint: npipe:////./pipe/docker_engine # Listen to the UNIX Docker socket exposedByDefault: false # Only expose container that are explicitly enabled (using label traefik.enabled) network: "traefik-net" # Default network to use for connections to all containers. swarmmode: true # Activates the Swarm Mode (instead of standalone Docker). swarmModeRefreshSeconds: 15 # Defines the polling interval (in seconds) in Swarm Mode. watch: true # Watch Docker Swarm events file: filename: "c:/config_traefik/dynamic_traefik.yml" # Link to the dynamic configuration watch: true # Watch for modifications providersThrottleDuration: 10 # Configuration reload frequency
And then my dynamic configuration and the issue i get it's "TLS store default not found"
I realy not understand what i miss. It's look like the traefik not able to find the certificate path ?
What did i miss ?
# Traefik dynamic configuration file # See https://doc.traefik.io/traefik/getting-started/configuration-overview/#the-dynamic-configuration tls: certificates: - certFile: c:/configuration/localhost.crt keyFile: c:/configuration/localhost.key - certFile: c:/configuration/www.localhost.com.crt keyFile: c:/configuration/www.localhost.com.key stores: default: defaultCertificate: # test default store because other certificate not work certFile: c:/configuration/www.localhost.cert keyFile: c:/configuration/www.localhost.key