diff --git a/docker-compose.yml b/docker-compose.yml index cbf633360d94f56de088e404a8d1ff0c94b2d0eb..97dcec7975edfd3af5e34a4b44a48e740ea75aab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,11 +15,11 @@ haproxy: ports: - "80:80" - "443:443" -letsencrypt: +letsencrypt-web: image: nginx volumes: - "./acme-challenge:/usr/share/nginx/html/.well-known/acme-challenge:ro" -letsencrypt-watch: +letsencrypt: image: indiehosters/letsencrypt volumes: - "./haproxy:/etc/haproxy" diff --git a/templates/haproxy.cfg.tmpl b/templates/haproxy.cfg.tmpl index 55262d3902dd99b3b1f9b8773f368594f0667ae2..bed02a23aa83932138992ba1f2410bec4a017f82 100644 --- a/templates/haproxy.cfg.tmpl +++ b/templates/haproxy.cfg.tmpl @@ -33,7 +33,7 @@ mode http reqadd X-Forwarded-Proto:\ https rspadd Strict-Transport-Security:\ max-age=15768000 - use_backend letsencrypt if { path_beg /.well-known/acme } + use_backend letsencrypt-web if { path_beg /.well-known/acme } {{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }} use_backend {{ $host}} if { hdr(host) -i {{ $host }} } {{end}} @@ -48,6 +48,6 @@ backend {{ $host }} {{end}} {{end}} -backend letsencrypt +backend letsencrypt-web cookie SERVERID insert nocache indirect - server Server letsencrypt:80 cookie Server + server Server letsencrypt-web:80 cookie Server