1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-01-30 04:30:49 +02:00
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:
bors[bot] 2019-12-09 11:55:17 +00:00 committed by GitHub
commit cfd838f310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -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"

View File

@ -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 && \

View File

@ -0,0 +1 @@
Add support for Traefik v2 certificate dumping