From 0c4f7b971f95ec2d801f539d4de100e5ccc96768 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Sun, 3 Sep 2023 18:03:08 +0200 Subject: [PATCH] Try to get some services to semi wan Signed-off-by: Magic_RB --- .../containers/ingress-blowhole/default.nix | 2 + terranix/containers/ingress-blowhole/job.hcl | 28 ++++++++- .../ingress-blowhole/upstreams.conf | 57 +++++++------------ 3 files changed, 46 insertions(+), 41 deletions(-) diff --git a/terranix/containers/ingress-blowhole/default.nix b/terranix/containers/ingress-blowhole/default.nix index 867dac9..d34531e 100644 --- a/terranix/containers/ingress-blowhole/default.nix +++ b/terranix/containers/ingress-blowhole/default.nix @@ -12,6 +12,8 @@ in flake_sha = vars.flake_sha; store_path = config'.flake.nixngConfigurations.ingressBlowhole.config.system.build.toplevel; upstreams = "\${file(\"${./upstreams.conf}\")}"; + jellyfin = "\${file(\"${./jellyfin.conf}\")}"; + hass = "\${file(\"${./hass.conf}\")}"; }; }; } diff --git a/terranix/containers/ingress-blowhole/job.hcl b/terranix/containers/ingress-blowhole/job.hcl index ccc53a2..ee9c56c 100644 --- a/terranix/containers/ingress-blowhole/job.hcl +++ b/terranix/containers/ingress-blowhole/job.hcl @@ -14,6 +14,14 @@ variable "upstreams" { type = string } +variable "jellyfin" { + type = string +} + +variable "hass" { + type = string +} + job "ingress" { datacenters = [ "homelab-1" ] type = "service" @@ -29,9 +37,15 @@ job "ingress" { network { mode = "bridge" - port "http-paccess" { - static = 80 - to = 81 + port "http-jellyfin" { + static = 8096 + to = 8096 + host_network = "wan" + } + + port "http-hass" { + static = 8086 + to = 8086 host_network = "wan" } @@ -279,6 +293,14 @@ EOF change_signal = "SIGHUP" } + template { + data = var. + + destination = "local/upstreams.conf" + change_mode = "signal" + change_signal = "SIGHUP" + } + template { data = <