So I am strugging w/ the seemingly simplest of examples...
my compose file is as foillows
Docker Compose
traefik:
container_name: traefik
hostname: traefik.dyer.house
image: traefik:v3.0
restart: always
command:
- --configFile=/traefik/traefik.yml
env_file:
- ./.env
networks:
- proxy
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/localtime:/etc/localtime:ro
- traefik_data:/traefik
- traefik_cert:/letsencrypt
whoami:
image: traefik/whoami
container_name: traefik-whoami
networks:
- proxy
labels:
- traefik.enable=true
- traefik.http.routers.mywhoami.tls=true
- traefik.http.routers.mywhoami.rule=Host(`whoami.dyer.house`)
- traefik.http.routers.mywhoami.entrypoints=websecure,web
Then my traefik.yml file
api:
insecure: true
dashboard: true
debug: true
entryPoints:
web:
address: ":80"
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
http:
tls: true
address: ":443"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
network: proxy
watch: true
log:
level: DEBUG
certificatesResolvers:
letsencrypt:
acme:
# Staging
# caserver: https://acme-staging-v02.api.letsencrypt.org/directory
email: xxxxxx@xxxx.com
storage: /letsencrypt/acme.json
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"
delayBeforeCheck: 5s
Startup logs as follows:
I am never seeing it actually issue a valid cert...
░▒▓ ~ ▓▒░ curl -Lv http://whoami.dyer.house ░▒▓ 60 ✘ at 20:57:48 ▓▒░
* Trying 192.168.100.3:80...
* Connected to whoami.dyer.house (192.168.100.3) port 80
> GET / HTTP/1.1
> Host: whoami.dyer.house
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Location: https://whoami.dyer.house/
< Date: Mon, 04 Mar 2024 02:02:32 GMT
< Content-Length: 17
<
* Ignoring the response-body
* Connection #0 to host whoami.dyer.house left intact
* Clear auth, redirects to port from 80 to 443
* Issue another request to this URL: 'https://whoami.dyer.house/'
* Trying 192.168.100.3:443...
* Connected to whoami.dyer.house (192.168.100.3) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
░▒▓ ~ ▓▒░
Unsure how best to proceed... Any help would be appreciated. Thanks
-John