Treafik version 2.5
Traefik.toml file
# Entry Points Configuration[entryPoints] [entryPoints.web] address = ":80" [entryPoints.websecure] address = ":443" [entryPoints.websecure.http.tls]# Providers Configuration[providers] [providers.docker] endpoint = "unix:///var/run/docker.sock" exposedByDefault = false# TLS Certificates Configuration[tls] [[tls.certificates]] certFile = "/certs/certificate.crt" keyFile = "/certs/private.key" stores = ["default"]# TLS Stores Configuration[tls.stores] [tls.stores.default] [tls.stores.default.defaultCertificate] certFile = "/certs/certificate.crt" keyFile = "/certs/private.key"# TLS Options Configuration[tls.options] [tls.options.default] minVersion = "VersionTLS12" maxVersion = "VersionTLS13" cipherSuites = ["TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" ] curvePreferences = ["CurveP521", "CurveP384"] sniStrict = true# API Configuration[api] dashboard = true insecure = true
docker-compose.yml file
version: '3.3'services: traefik: image: traefik:v2.5 command: - --configFile=/traefik.toml ports: - "80:80" - "443:443" - "8080:8080" volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "/certs:/certs" - "./traefik.toml:/traefik.toml" labels: - "traefik.enable=true" - "traefik.http.routers.api.rule=Host(`example`)" - "traefik.http.routers.api.service=api@internal" - "traefik.http.routers.api.entrypoints=websecure" backend: build: ./backend labels: - "traefik.enable=true" - "traefik.http.routers.backend.rule=Host(`example`)" - "traefik.http.services.backend.loadbalancer.server.port=4000" - "traefik.http.routers.backend.entrypoints=websecure" env_file: - ./backend/.env volumes: - ./backend/upload/images:/app/backend/upload/images frontend: build: ./frontend labels: - "traefik.enable=true" - "traefik.http.routers.frontend.rule=Host(`example`, `example`)" - "traefik.http.services.frontend.loadbalancer.server.port=3000" - "traefik.http.routers.frontend.entrypoints=websecure" env_file: - ./frontend/.env admin: build: ./admin labels: - "traefik.enable=true" - "traefik.http.routers.admin.rule=Host(`example`)" - "traefik.http.services.admin.loadbalancer.server.port=5173" - "traefik.http.routers.admin.entrypoints=websecure" env_file: - ./admin/.env
SSL Checker states: (Check picture)
my LCN DNS records:all A pointed to correct IP address
DNS check states resolved
root@ubuntu-s-2vcpu-4gb-amd-lon1-01:/home/root/example# docker exec -it $(docker ps -qf "name=example_traefik_1") sh -c 'ls -l /certs; cat /traefik.toml'total 8-rw-r--r-- 1 root root 2244 Jun 24 10:53 certificate.crt-rw------- 1 root root 1704 Jun 20 14:49 private.key# Entry Points Configuration[entryPoints] [entryPoints.web] address = ":80" [entryPoints.websecure] address = ":443" [entryPoints.websecure.http.tls]# Providers Configuration[providers] [providers.docker] endpoint = "unix:///var/run/docker.sock" exposedByDefault = false# TLS Certificates Configuration[tls] [[tls.certificates]] certFile = "/certs/certificate.crt" keyFile = "/certs/private.key" stores = ["default"]# TLS Stores Configuration[tls.stores] [tls.stores.default] [tls.stores.default.defaultCertificate] certFile = "/certs/certificate.crt" keyFile = "/certs/private.key"# TLS Options Configuration[tls.options] [tls.options.default] minVersion = "VersionTLS12" maxVersion = "VersionTLS13" cipherSuites = ["TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" ] curvePreferences = ["CurveP521", "CurveP384"] sniStrict = true# API Configuration[api] dashboard = true insecure = true
Completely lost on what i'm missing or doing wrong?Why is it still assigning the default and not my custom certificate?