diff --git a/templates/Caddyfile.j2 b/templates/Caddyfile.j2 index b1cd3fd..7872142 100644 --- a/templates/Caddyfile.j2 +++ b/templates/Caddyfile.j2 @@ -7,7 +7,26 @@ origins http://{{ private_ip_caddy }}:2019 } } -:80 { +caddy.{{ ansible_default_ipv4.address | replace(".", "-") }}.sslip.io { root * /usr/share/caddy file_server } + +nginx.{{ ansible_default_ipv4.address | replace(".", "-") }}.sslip.io { + reverse_proxy {{ private_ip_nginx }}:80 { + health_uri / + health_interval 10s + health_timeout 5s + } +} + +monitoring.{{ ansible_default_ipv4.address | replace(".", "-") }}.sslip.io { + reverse_proxy {{ private_ip_monitoring }}:9090 { + health_uri /-/healthy + health_interval 10s + health_timeout 5s + } + basic_auth { + {{ demo_user }} {{ demo_pass | password_hash('bcrypt') }} + } +} \ No newline at end of file