Server/school: add dns record and caddy reverse proxy

This commit is contained in:
Toast 2025-01-27 13:29:31 +01:00
parent 8a700174b1
commit ac36661d4e

View file

@ -107,4 +107,32 @@ in {
system.stateVersion = "24.11";
};
};
services = {
headscale.settings.dns.extra_records = [
{
name = "shows.everest.tailscale";
type = "A";
value = "100.100.0.1";
}
];
caddy.virtualHosts.shows= {
hostName = "shows.everest.tailscale";
extraConfig = ''
import tailscale
handle {
respond "Ionic app goes here"
}
redir /admin /admin/
handle_path /admin/* {
respond "Angular admin panel goes here"
}
redir /api /api/
handle_path /api/* {
reverse_proxy ${config.containers.school.localAddress}:3000
}
'';
};
};
}