https://github.com/itzg/docker-haproxy-lets
Adds Let's Encrypt support to the official haproxy image
https://github.com/itzg/docker-haproxy-lets
Last synced: 3 months ago
JSON representation
Adds Let's Encrypt support to the official haproxy image
- Host: GitHub
- URL: https://github.com/itzg/docker-haproxy-lets
- Owner: itzg
- License: apache-2.0
- Created: 2016-12-25T21:27:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-24T17:12:17.000Z (over 8 years ago)
- Last Synced: 2026-01-20T13:44:26.572Z (6 months ago)
- Language: Shell
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Adds Let's Encrypt support to the official haproxy image
## Configuration
### Volumes
* `/certs` : the concatenated LetsEncrypt cert + key is stored here as `haproxy.pem`
* `/config` : by default `haproxy-gen-cfg.yml` is loaded from here to render the haproxy.cfg
### Environment Variables
* `EMAIL` : **required** for specifying the e-mail registration for LetsEncrypt certificate
* `DOMAINS` : comma separated list of `DOMAIN@BACKEND:PORT` where `DOMAIN` is the public
domain to serve, `BACKEND` is the Docker resolvable hostname of the backend service, and
`PORT` is the listening port of that service.
* `STAGING` : set to `true` in order to use staging LetsEncrypt certificate requests
#### NOTE for DOMAINS
The `DOMAINS` values is persisted and read from `/config/domains` so that the domain mapping can be changed
without re-creating the entire container. When changing domain mappings, be sure to edit or remove that
file.
### Port Mappings
* 80
* 443
## Example
The following would request a certificate to identify two domains and proxy those each to
distinct backend Docker services.
```
docker run -d -e EMAIL=me@there \
-e DOMAINS=one.com@service1:8080,two.com@service2:8080 \
itzg/haproxy-lets
```