From 01182d3708c47939ac0adc4f6a08d2e0f3d59dfc Mon Sep 17 00:00:00 2001 From: kaiyou Date: Sun, 17 Sep 2017 12:09:08 +0200 Subject: [PATCH] Switch to rule-based hosts for certificate generation --- .env.dist | 4 +++- traefik/conf/cert.toml | 7 ------- traefik/conf/letsencrypt.toml | 3 ++- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.env.dist b/.env.dist index 24f33921..49365bc2 100644 --- a/.env.dist +++ b/.env.dist @@ -23,8 +23,10 @@ BIND_ADDRESS=127.0.0.1 # Main mail domain DOMAIN=mailu.io -# Exposed mail-server hostname +# Main hostname for announces, and list of all available hostnames, separated +# by comas HOSTNAME=mail.mailu.io +HOSTNAMES=mail.mailu.io,alternative.mailu.io,yetanother.mailu.io # Postmaster local part (will append the main mail domain) POSTMASTER=admin diff --git a/traefik/conf/cert.toml b/traefik/conf/cert.toml index ab612141..dab3cccb 100644 --- a/traefik/conf/cert.toml +++ b/traefik/conf/cert.toml @@ -22,10 +22,3 @@ domain = "{{ DOMAIN }}" watch = true exposedbydefault = false -[acme] -email = "{{ POSTMASTER }}@{{ DOMAIN }}" -storageFile = "/certs/acme.json" -onDemand = true -entryPoint = "https" - - diff --git a/traefik/conf/letsencrypt.toml b/traefik/conf/letsencrypt.toml index 6008dadf..ddc2a7b4 100644 --- a/traefik/conf/letsencrypt.toml +++ b/traefik/conf/letsencrypt.toml @@ -22,7 +22,8 @@ exposedbydefault = false [acme] email = "{{ POSTMASTER }}@{{ DOMAIN }}" storageFile = "/certs/acme.json" -onDemand = true +onDemand = false +OnHostRule = true entryPoint = "https"