The letsencrypt integration set EASYHAPROXY_LETSENCRYPT_EMAIL (with a stray quote) and a letsencrypt label, which EasyHAProxy has not read since before 4.6.0. With an email set, http redirected to https and nothing answered on 443. - Pass EASYHAPROXY_CERTBOT_EMAIL and EASYHAPROXY_CERTBOT_SERVER. - Label the app with certbot=true on its http definition: EasyHAProxy requests the certificate and serves https itself, so the separate 443 definition goes. https labels are only added when a letsencrypt email is set, as documented. - Keep the certificates in /var/lib/dokku/data/haproxy. - Turn the stats page off with HAPROXY_STATS_ENABLE=false. - Upgrade EasyHAProxy from 6.1.1 to 6.5.1.
32 lines
904 B
Plaintext
32 lines
904 B
Plaintext
---
|
|
services:
|
|
haproxy:
|
|
image: "{{ $.HAPROXY_IMAGE }}"
|
|
|
|
environment:
|
|
- EASYHAPROXY_DISCOVER=docker
|
|
- EASYHAPROXY_LABEL_PREFIX=haproxy
|
|
- EASYHAPROXY_LOG_LEVEL={{ $.HAPROXY_LOG_LEVEL }}
|
|
- EASYHAPROXY_REFRESH_CONF={{ $.HAPROXY_REFRESH_CONF }}
|
|
- CERTBOT_LOG_LEVEL={{ $.HAPROXY_LOG_LEVEL }}
|
|
- HAPROXY_LOG_LEVEL={{ $.HAPROXY_LOG_LEVEL }}
|
|
{{ if $.HAPROXY_LETSENCRYPT_EMAIL }}
|
|
- EASYHAPROXY_CERTBOT_EMAIL={{ $.HAPROXY_LETSENCRYPT_EMAIL }}
|
|
- EASYHAPROXY_CERTBOT_SERVER={{ $.HAPROXY_LETSENCRYPT_SERVER }}
|
|
{{ end }}
|
|
- HAPROXY_STATS_ENABLE=false
|
|
|
|
network_mode: bridge
|
|
|
|
ports:
|
|
- "80:80"
|
|
{{ if $.HAPROXY_LETSENCRYPT_EMAIL }}
|
|
- "443:443"
|
|
{{ end }}
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
- "{{ $.HAPROXY_DATA_DIR }}:/etc/easyhaproxy/certs/certbot"
|