1
0
Fork 0
docker-easy-haproxy/docs/other.md
Claude aee9645b43
Enhance documentation with Docusaurus features and fix inaccuracies
Verified against source code and enhanced with Docusaurus markdown features:

Documentation Accuracy Fixes:
- Fixed acme.md: Added "letsencrypt" as valid AUTOCONFIG value (was incorrectly shown as "-")
- Added reference to ACME docs from environment-variable.md
- Verified all features against actual implementation in /src

Docusaurus Enhancements Added:
- Admonitions (:::note, :::tip, :::warning, :::danger, :::info) for important callouts
- Code block titles for all bash/yaml examples (e.g., title="Install EasyHAProxy")
- Better structured warnings and notes for limitations
- Improved formatting and readability throughout

Files Enhanced:
- kubernetes.md: Added info boxes, warnings, code titles
- docker.md: Added limitation warnings, code titles
- swarm.md: Added advantage tips, limitation warnings
- acme.md: Fixed Let's Encrypt autoconfig, enhanced requirements with admonitions
- ssl.md: Added code block titles for all examples
- static.md: Added live reload tip, SSL certificate note
- container-labels.md: Added definition explanation, code titles
- limitations.md: Restructured with clear warnings and explanations
- helm.md: Added warnings, code titles
- microk8s.md: Added ingress controller warning, code titles
- volumes.md: Added info box about volume purposes
- other.md: Added code block titles
- environment-variable.md: Added ACME reference note

All changes verified against actual Python source code implementation.
2025-11-09 23:50:44 +00:00

1.6 KiB

sidebar_position
14

Other configurations

Exposing Ports

Some ports on the EasyHAProxy container and in the firewall are required to be open. However, you don't need to expose the other container ports because EasyHAProxy will handle that.

  • The ports 80 and 443.
  • If you enable the HAProxy statistics, you must also expose the port defined in HAPROXY_STATS_PORT environment variable (default 1936). Be aware that statistics are enabled by default with no password.
  • Every port defined in easyhaproxy.[definitions].port also should be exposed.

For example:

docker run \
    /* other parameters */
    -p 80:80 \
    -p 443:443 \
    -p 1936:1936 \
    -d byjg/easy-haproxy

Mapping Docker Volume

The docker volume or a way to call the API needs to pass to the EasyHAProxy container.

docker run \
    /* other parameters */
    -v /var/run/docker.sock:/var/run/docker.sock \
    -d byjg/easy-haproxy

Mapping custom .cfg files

You can concatenate valid HAProxy .cfg files to the dynamically generated haproxy.cfg by mapping the folder /etc/haproxy/conf.d.

docker run \
    /* other parameters */
    -v /your/local/conf.d:/etc/haproxy/conf.d \
    -d byjg/easy-haproxy

Setting Custom Errors

If enabled, map the volume : /etc/haproxy/errors-custom/ to your container and put a file named ERROR_NUMBER.http where ERROR_NUMBER is the HTTP error code (e.g., 503.http)


Open source ByJG