diff --git a/hosts/test-vm/whib-frontend.nix b/hosts/test-vm/whib-frontend.nix index 83aebf4..f1a58ae 100644 --- a/hosts/test-vm/whib-frontend.nix +++ b/hosts/test-vm/whib-frontend.nix @@ -13,20 +13,22 @@ in services.whib-frontend = { enable = true; - domain = "whib-frontend.local"; - port = "8081"; + # nginx serves the frontend; matches the Host header of http://localhost:8081 + domain = "localhost"; # backendHost = "https://api.whib.ppp.pm/"; backendHost = "http://localhost:8080"; }; + networking.firewall.allowedTCPPorts = [ 80 ]; + virtualisation.vmVariant = { virtualisation = { forwardPorts = [ { - # Service API + # Frontend served by nginx from = "host"; host.port = 8081; - guest.port = 8081; + guest.port = 80; } ]; };