I'm running traefik 2.5 in a docker-compose container, with a preserved acme.json
cert store.
I just tried to clean out the acme.json and restart traefik to get it to recreate the letsencrypt certs, but it's not working. I'm not an expert in this.
Here's my docker-compose stanza:
reverse-proxy:
image: traefik:v2.5
container_name: reverse-proxy
restart: unless-stopped
ports:
- 80:80
- 443:443
# The Web UI (enabled by --api.insecure=true)
- 8080:8080
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
# Traefik static config file
- ./traefik.yaml:/etc/traefik/traefik.yaml
# Traefik dynamic config files
- ./traefik-config:/etc/traefik/config
# ACME (LetsEncrypt) certs:
- ./acme.json:/acme.json
and my traefik.yaml
:
docker: {}
file:
directory: /etc/traefik/config
watch: true
entryPoints:
web:
address: ":80"
http:
redirections:
entryPoint:
to: websecure
websecure:
address: ":443"
http:
tls: {}
certificatesResolvers:
myresolver:
acme:
email: me@example.com
storage: acme.json
httpChallenge:
entryPoint: web
log:
level: INFO
api:
dashboard: TRUE
accessLog: {}
I have all my services and routers listed in the traefik-config/traefik-dynamic.yaml
as usual.
The sites are working normally, but they have no certs -- just the traefik default self-signed one.
I don't see anything in the docker-compose logs for the reverse-proxy service, but there's a lot of noise in there so I don't know if I'm missing something.
I did recreate the acme.json
file just by touching it and chmod 644. But it's still empty after the docker-compose restart
. What should I do now?