Hello. I'm quite new to traefik. In my playground, I had a fully working example with traefik working like reverse proxy for my on-host apps (not systemd or docker).
This is my docker-compose file for traefik, working on host:
name: "traefik"
services:
traefik:
image: traefik:3.0.2
restart: "on-failure"
volumes:
- "/home/groosha/traefik/config.yml:/etc/traefik/traefik.yml:ro"
- "/home/groosha/traefik/configurations:/opt/traefik/configurations"
- "/home/groosha/traefik/sslcerts:/etc/traefik/acme"
network_mode: "host"
My static config:
# file config.yml
providers:
file:
directory: /opt/traefik/configurations
watch: true
http:
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
adDefault: true
certificatesResolvers:
myresolver:
acme:
email: myemail@example.com
storage: acme.json
httpChallenge:
# used during the challenge
entryPoint: web
log:
level: "DEBUG"
My dynamic config for a simple Python FastAPI app running on that host (again, no docker yet):
http:
services:
fastapi:
loadBalancer:
servers:
- url: "http://127.0.0.1:8000"
routers:
to-fastapi:
rule: "Host(`fastapidemo.example.com`)"
service: "fastapi"
entryPoints:
- "websecure"
However, upon starting traefik, I see these errors:
> Configuration received config={"http":{"routers":{"to-fastapi":{"entryPoints":["websecure"],"rule":"Host(`fastapidemo.example.com`)","service":"fastapi"}},"services":{"fastapi":{"loadBalancer":{"passHostHeader":true,"responseForwarding":{"flushInterval":"100ms"},"servers":[{"url":"http://127.0.0.1:8000"}]}}}},"tcp":{},"tls":{},"udp":{}} providerName=file
> Configuration received config={"http":{"routers":{"acme-http":{"entryPoints":["web"],"priority":9223372036854775807,"rule":"PathPrefix(`/.well-known/acme-challenge/`)","ruleSyntax":"v3","service":"acme-http@internal"}},"serversTransports":{"default":{"maxIdleConnsPerHost":200}},"services":{"acme-http":{},"noop":{}}},"tcp":{"serversTransports":{"default":{"dialKeepAlive":"15s","dialTimeout":"30s"}}},"tls":{},"udp":{}} providerName=internal
> Configuration received config={"http":{},"tcp":{},"tls":{},"udp":{}} providerName=myresolver.acme
> No default certificate, fallback to the internal generated certificate tlsStoreName=default
> EntryPoint doesn't exist entryPointName=web routerName=acme-http@internal
> No valid entryPoint for this router routerName=acme-http@internal
> EntryPoint doesn't exist entryPointName=websecure routerName=to-fastapi@file
> No valid entryPoint for this router routerName=to-fastapi@file
> No default certificate, fallback to the internal generated certificate tlsStoreName=default
> EntryPoint doesn't exist entryPointName=websecure routerName=to-fastapi@file
> No valid entryPoint for this router routerName=to-fastapi@file
> EntryPoint doesn't exist entryPointName=web routerName=acme-http@internal
> No valid entryPoint for this router routerName=acme-http@internal
Before adding Let'sEncrypt and websecure endpoint everything was working, but just with HTTP. Adding HTTPS leads to these errors.