{% set sites = ['future.porn', 'pgadmin.sbtp.xyz', 'rssapp.sbtp.xyz'] %} {% for site in sites %} {{ site }} { # Define the upstream servers (docker swarm nodes) for load balancing reverse_proxy {% for host in groups['our'] %}{{ hostvars[host]['internal_ip'] }}:{{ our_server_port }} {% endfor %} { # Load balancing policy (optional, defaults to "random") lb_policy least_connections # Health checks health_uri /health health_interval 10s health_timeout 5s } handle_errors { respond "💥 Error; Please try again later. Code {err.status_code} | {err.status_text}." } } {% endfor %}