From 5d0f008f6b0f8b063c73a3f63b4ff35cdcde0f70 Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 29 Jul 2026 09:10:20 +0200 Subject: [PATCH] feat(caddy): add sslip.io subdomain routing, basic auth, and health checks --- templates/Caddyfile.j2 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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