Skip to content

haproxy/config-template

Configuration options for HAProxy backend services

HAProxy Configuration Template

This parameter defines the template used to generate the HAProxy configuration file (haproxy.cfg). It allows customization of the load balancer setup through user-defined templates.

Requirements

  • Template must exist in the content bundle or be accessible to Digital Rebar
  • Template must generate valid HAProxy configuration syntax
  • Template should handle both frontend and backend configurations

Usage

Default Template

By default, this uses the haproxy.cfg.tmpl template from the HAProxy content bundle:

  haproxy/config-template: haproxy.cfg.tmpl

Custom Template

To use a custom template:

  1. Create your template file (e.g., my-haproxy.cfg.tmpl)
  2. Set the parameter:
  haproxy/config-template: my-haproxy.cfg.tmpl

The template will be used during HAProxy configuration to generate /etc/haproxy/haproxy.cfg.