mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-30 04:30:49 +02:00
Merge #1215
1215: Allow specifying the traefik version for cert dumping r=mergify[bot] a=timoschwarzer ## What type of PR? Enhancement ## What does this PR do? ### Related issue(s) - #1011 ## Prerequistes Before we can consider review and merge, please make sure the following list is done and checked. If an entry in not applicable, you can check it or remove it from the list. - [X] In case of feature or enhancement: documentation updated accordingly - [X] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file. Co-authored-by: Timo Schwarzer <me@timoschwarzer.com>
This commit is contained in:
commit
cfd838f310
@ -25,6 +25,8 @@ services:
|
||||
# Make sure this is the same as the main=-domain in traefik.toml
|
||||
# !!! Also don’t forget to add "TRAEFIK_DOMAIN=[...]" to your .env!
|
||||
- DOMAIN=$TRAEFIK_DOMAIN
|
||||
# Set TRAEFIK_VERSION to v2 in your .env if you're using Traefik v2
|
||||
- TRAEFIK_VERSION=${TRAEFIK_VERSION:-v1}
|
||||
volumes:
|
||||
- "/data/traefik:/traefik"
|
||||
- "$ROOT/certs:/output"
|
||||
|
@ -3,7 +3,7 @@
|
||||
function dump() {
|
||||
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 ]] && \
|
||||
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