mirror of
https://github.com/Mailu/Mailu.git
synced 2025-06-12 23:57:29 +02:00
Allow specifying the traefik version for cert dumping
This commit is contained in:
parent
b668eccc17
commit
0c82caf817
docs/compose/traefik
optional/traefik-certdumper
towncrier/newsfragments
@ -25,6 +25,8 @@ services:
|
|||||||
# Make sure this is the same as the main=-domain in traefik.toml
|
# Make sure this is the same as the main=-domain in traefik.toml
|
||||||
# !!! Also don’t forget to add "TRAEFIK_DOMAIN=[...]" to your .env!
|
# !!! Also don’t forget to add "TRAEFIK_DOMAIN=[...]" to your .env!
|
||||||
- DOMAIN=$TRAEFIK_DOMAIN
|
- DOMAIN=$TRAEFIK_DOMAIN
|
||||||
|
# Set TRAEFIK_VERSION to v2 in your .env if you're using Traefik v2
|
||||||
|
- TRAEFIK_VERSION=${TRAEFIK_VERSION:-v1}
|
||||||
volumes:
|
volumes:
|
||||||
- "/data/traefik:/traefik"
|
- "/data/traefik:/traefik"
|
||||||
- "$ROOT/certs:/output"
|
- "$ROOT/certs:/output"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
function dump() {
|
function dump() {
|
||||||
echo "$(date) Dumping certificates"
|
echo "$(date) Dumping certificates"
|
||||||
|
|
||||||
traefik-certs-dumper file --crt-name "cert" --crt-ext ".pem" --key-name "key" --key-ext ".pem" --domain-subdir --dest /tmp/work --source /traefik/acme.json > /dev/null
|
traefik-certs-dumper file --version ${TRAEFIK_VERSION:-v1} --crt-name "cert" --crt-ext ".pem" --key-name "key" --key-ext ".pem" --domain-subdir --dest /tmp/work --source /traefik/acme.json > /dev/null
|
||||||
|
|
||||||
if [[ -f /tmp/work/${DOMAIN}/cert.pem && -f /tmp/work/${DOMAIN}/key.pem && -f /output/cert.pem && -f /output/key.pem ]] && \
|
if [[ -f /tmp/work/${DOMAIN}/cert.pem && -f /tmp/work/${DOMAIN}/key.pem && -f /output/cert.pem && -f /output/key.pem ]] && \
|
||||||
diff -q /tmp/work/${DOMAIN}/cert.pem /output/cert.pem >/dev/null && \
|
diff -q /tmp/work/${DOMAIN}/cert.pem /output/cert.pem >/dev/null && \
|
||||||
|
1
towncrier/newsfragments/1011.feature
Normal file
1
towncrier/newsfragments/1011.feature
Normal file
@ -0,0 +1 @@
|
|||||||
|
Add support for Traefik v2 certificate dumping
|
Loading…
x
Reference in New Issue
Block a user