From 85357f6d5c8b4406c630c2627165ff55f35b84ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Br=C3=BCckner?= Date: Sat, 4 Aug 2018 19:49:58 +0200 Subject: [PATCH] Readme angepasst --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 270a069..993a5a6 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,35 @@ # Traefik Certificate Extractor -Tool to extract Let's Encrypt certificates from Traefik's ACME storage file. +Forked from [DanielHuisman/traefik-certificate-extractor](https://github.com/DanielHuisman/traefik-certificate-extractor) + +Tool to extract Let's Encrypt certificates from Traefik's ACME storage file. Can automatically restart containers using the docker API. ## Installation ``` -git clone https://github.com/DanielHuisman/traefik-certificate-extractor +git clone https://github.com/snowmb/traefik-certificate-extractor cd traefik-certificate-extractor ``` ## Usage ``` -python3 extractor.py [directory] +python3 extractor.py [FILE] ``` -Default directory is `./data`. The output directory is `./certs`. +Default file is `./data/acme.json`. The output directories are `./certs` and `./certs_flat`. ## Docker -There is a Docker image available for this tool: [danielhuisman/traefik-certificate-extractor](https://hub.docker.com/r/danielhuisman/traefik-certificate-extractor/). +There is a Docker image available for this tool: [snowmb/traefik-certificate-extractor](https://hub.docker.com/r/snowmb/traefik-certificate-extractor/). Example run: ``` -docker run --name extractor -d -v /srv/extractor/data:/app/data -v /srv/extractor/certs:/app/certs danielhuisman/traefik-certificate-extractor +docker run --name extractor -d \ + -v /opt/traefik:/app/data \ + -v ./certs:/app/certs \ + -v /var/run/docker.socket:/var/run/docker.socket \ + snowmb/traefik-certificate-extractor ``` +Mount the whole folder containing the traefik certificate file as `/app/data`. The extracted certificates are going to be written to `/app/certs`. +The docker socket is used to find any containers with this label: `com.github.SnowMB.traefik-certificate-extractor.restart_domain=`. +If the domains of an extracted certificate and the restart domain matches, the container is restarted. Multiple domains can be given seperated by `,`. + ## Output ```