feat: add letsencrypt support to haproxy plugin

This commit is contained in:
Jose Diaz-Gonzalez
2023-02-11 06:22:02 -05:00
parent 537d8321e4
commit cbd3c43176
6 changed files with 111 additions and 5 deletions

View File

@@ -111,6 +111,30 @@ dokku haproxy:set --global log-level DEBUG
After modifying, the Haproxy container will need to be restarted.
### SSL Configuration
The haproxt plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
#### Enabling letsencrypt integration
By default, letsencrypt is disabled and https port mappings are ignored. To enable, set the `letsencrypt-email` property with the `--global` flag:
```shell
dokku haproxt:set --global letsencrypt-email automated@dokku.sh
```
After enabling, the Haproxy container will need to be restarted and apps will need to be rebuilt. All http requests will then be redirected to https.
#### Customizing the letsencrypt server
The letsencrypt integration is set to the production letsencrypt server by default. To change this, set the `letsencrypt-server` property with the `--global` flag:
```shell
dokku haproxt:set --global letsencrypt-server https://acme-staging-v02.api.letsencrypt.org/directory
```
After enabling, the Haproxy container will need to be restarted and apps will need to be rebuilt to retrieve certificates from the new server.
## Displaying Haproxy reports for an app
You can get a report about the app's Haproxy config using the `haproxy:report` command: