Docker service that acts as a (layer 4 / layer 7) proxy and makes use of Let’s Encrypt.
-
Create a HAProxy configuration file called
haproxy.cfg
, in which a domain certificate path is:/usr/local/etc/haproxy/certs/{YOUR_DOMAIN_HERE}.pem
-
Create a Dockerfile:
FROM xsystems/haproxy-letsencrypt:latest COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
-
Build your image using the Dockerfile:
docker build --tag my-haproxy-letsencrypt .
-
Before using the just created image, set the following environment variables:
Environment Variable | Default Value | Description | Required |
---|---|---|---|
PROXY_DOMAINS | A space separated list of domains your machine can be reached at. | ✔ | |
PROXY_EMAIL | An email for error reporting. | ||
PROXY_CERTIFICATE_RENEWAL_INTERVAL | 0 7,19 * * * | How often should be checked for certificate expiry. | |
PROXY_STAGING_DISABLED | false | Disable staging mode i.e. issue trusted certificates. |
Run the build.sh script.
- Make sure you are allowed to push to the
xsystems
repository on Docker Hub e.g. by doing:docker login
- Set the
COMMIT
environment variable to the Git commit hash of the commit that needs to be released. - Set the
VERSION
environment variable to the version that needs to be released. - Run the release.sh script.