Skip to content

Instantly share code, notes, and snippets.

@csamsel
Created June 6, 2025 20:10
Show Gist options
  • Save csamsel/f5cf955d50f164e08ec1052afefd9133 to your computer and use it in GitHub Desktop.
Save csamsel/f5cf955d50f164e08ec1052afefd9133 to your computer and use it in GitHub Desktop.
docker compose file for traefik and traefik-certs-dumper that is compatible with letsencrypt file naming, inspired by pangolin. make sure to use fullchain.pem not cert.pem.
name: proxy
services:
traefik:
image: traefik:latest
container_name: traefik
restart: unless-stopped
ports: # added ports to expose from traefik
- 443:443
- 80:80
depends_on:
pangolin:
condition: service_healthy
command:
- --configFile=/etc/traefik/traefik_config.yml
# Add the environment variables for your DNS provider.
environment:
volumes:
- ./config/traefik:/etc/traefik:ro # Volume to store the Traefik configuration
- ./config/letsencrypt:/letsencrypt # Volume to store the Let's Encrypt certificates
- ./config/traefik/logs:/var/log/traefik # Volume to store Traefik logs
traefik-certs-dumper:
depends_on:
traefik:
condition: service_started
image: ldez/traefik-certs-dumper:latest
entrypoint: sh -c '
while ! [ -e /data/acme.json ]
|| ! [ `jq ".[] | .Certificates | length" /data/acme.json | jq -s "add" ` != 0 ]; do
sleep 1
; done
&& traefik-certs-dumper file --version v3 --watch --domain-subdir=true --crt-ext=.pem --crt-name=fullchain --key-name=privkey --key-ext=.pem --source /data/acme.json --dest /data/live'
volumes:
- ./config/letsencrypt:/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment