mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Fix traefik certdumper
This commit is contained in:
parent
d36521e6f9
commit
80ec00dc05
3 changed files with 6 additions and 17 deletions
|
|
@ -32,6 +32,7 @@ email = "letsencrypt.account@banditlair.com"
|
||||||
storage = "acme.json"
|
storage = "acme.json"
|
||||||
entryPoint = "https"
|
entryPoint = "https"
|
||||||
OnHostRule = true
|
OnHostRule = true
|
||||||
|
KeyType = "RSA4096"
|
||||||
[acme.httpChallenge]
|
[acme.httpChallenge]
|
||||||
entryPoint = "http"
|
entryPoint = "http"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ version: '3'
|
||||||
services:
|
services:
|
||||||
traefik:
|
traefik:
|
||||||
container_name: traefik
|
container_name: traefik
|
||||||
image: traefik:1.6.0-rc6-alpine
|
image: traefik:1.7.12-alpine
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
|
|
@ -24,26 +24,14 @@ services:
|
||||||
- web
|
- web
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
# Watch acme.json and dump certificates to files
|
|
||||||
certdumper:
|
certdumper:
|
||||||
container_name: traefik_certdumper
|
image: ldez/traefik-certs-dumper:v2.4.1
|
||||||
image: alpine:latest
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- traefik
|
- traefik
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./certs:/traefik
|
- ./certs:/traefik
|
||||||
command: >
|
command: file --source /traefik/acme.json --dest /traefik/ssl --watch
|
||||||
ash -c " \
|
|
||||||
apk --no-cache add inotify-tools jq openssl util-linux bash && \
|
|
||||||
wget https://raw.githubusercontent.com/containous/traefik/master/contrib/scripts/dumpcerts.sh -O dumpcerts.sh && \
|
|
||||||
mkdir -p /traefik/ssl/ && \
|
|
||||||
while true; do \
|
|
||||||
inotifywait -e modify /traefik/acme.json && \
|
|
||||||
bash dumpcerts.sh /traefik/acme.json /traefik/ssl/ && \
|
|
||||||
ln -f /traefik/ssl/certs/* /traefik/ssl/ && \
|
|
||||||
ln -f /traefik/ssl/private/* /traefik/ssl/; \
|
|
||||||
done"
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
web:
|
web:
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
docker_network:
|
docker_network:
|
||||||
name: web
|
name: web
|
||||||
- name: Start traefik docker project
|
- name: Start traefik docker project
|
||||||
docker_service: project_src={{docker_compose_files_folder}}/traefik state=present
|
docker_compose: project_src={{docker_compose_files_folder}}/traefik state=present
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue