1
0
Fork 0

mediaserver: Exposes services on veth interface

This commit is contained in:
Daniel Kempkens 2023-04-18 20:11:34 +02:00
parent fe447e1a68
commit e48e8bc67d
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
4 changed files with 6 additions and 76 deletions

View file

@ -15,24 +15,6 @@
}; };
}; };
systemd.services.socat-prowlarr = {
description = "socat exposes prowlarr";
bindsTo = [ "wg.service" ];
requires = [ "prowlarr.service" ];
after = [ "wg.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
RuntimeDirectory = "socat-prowlarr";
DynamicUser = true;
UMask = "000";
NetworkNamespacePath = "/var/run/netns/wg";
ExecStart = "${pkgs.socat}/bin/socat -d -d UNIX-LISTEN:/run/socat-prowlarr/prowlarr.sock,unlink-early,fork TCP4:127.0.0.1:9696";
Restart = "on-failure";
};
};
services.nginx.virtualHosts."prowlarr.internal.kempkens.network" = { services.nginx.virtualHosts."prowlarr.internal.kempkens.network" = {
quic = true; quic = true;
http3 = true; http3 = true;
@ -46,8 +28,8 @@
locations."/" = { locations."/" = {
recommendedProxySettings = true; recommendedProxySettings = true;
proxyPass = "http://192.168.42.2:9696";
proxyWebsockets = true; proxyWebsockets = true;
proxyPass = "http://unix:/run/socat-prowlarr/prowlarr.sock:/";
}; };
}; };
} }

View file

@ -17,24 +17,6 @@
}; };
}; };
systemd.services.socat-radarr = {
description = "socat exposes radarr";
bindsTo = [ "wg.service" ];
requires = [ "radarr.service" ];
after = [ "wg.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
RuntimeDirectory = "socat-radarr";
DynamicUser = true;
UMask = "000";
NetworkNamespacePath = "/var/run/netns/wg";
ExecStart = "${pkgs.socat}/bin/socat -d -d UNIX-LISTEN:/run/socat-radarr/radarr.sock,unlink-early,fork TCP4:127.0.0.1:7878";
Restart = "on-failure";
};
};
services.nginx.virtualHosts."radarr.internal.kempkens.network" = { services.nginx.virtualHosts."radarr.internal.kempkens.network" = {
quic = true; quic = true;
http3 = true; http3 = true;
@ -48,7 +30,8 @@
locations."/" = { locations."/" = {
recommendedProxySettings = true; recommendedProxySettings = true;
proxyPass = "http://unix:/run/socat-radarr/radarr.sock:/"; proxyPass = "http://192.168.42.2:7878";
proxyWebsockets = true;
}; };
}; };
} }

View file

@ -18,24 +18,6 @@
}; };
}; };
systemd.services.socat-sabnzbd = {
description = "socat exposes sabnzbd";
bindsTo = [ "wg.service" ];
requires = [ "sabnzbd.service" ];
after = [ "wg.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
RuntimeDirectory = "socat-sabnzbd";
DynamicUser = true;
UMask = "000";
NetworkNamespacePath = "/var/run/netns/wg";
ExecStart = "${pkgs.socat}/bin/socat -d -d UNIX-LISTEN:/run/socat-sabnzbd/sabnzbd.sock,unlink-early,fork TCP4:127.0.0.1:8080";
Restart = "on-failure";
};
};
services.nginx.virtualHosts."sabnzbd.internal.kempkens.network" = { services.nginx.virtualHosts."sabnzbd.internal.kempkens.network" = {
quic = true; quic = true;
http3 = true; http3 = true;
@ -49,7 +31,7 @@
locations."/" = { locations."/" = {
recommendedProxySettings = true; recommendedProxySettings = true;
proxyPass = "http://unix:/run/socat-sabnzbd/sabnzbd.sock:/"; proxyPass = "http://192.168.42.2:8080";
}; };
}; };
} }

View file

@ -17,24 +17,6 @@
}; };
}; };
systemd.services.socat-sonarr = {
description = "socat exposes sonarr";
bindsTo = [ "wg.service" ];
requires = [ "sonarr.service" ];
after = [ "wg.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
RuntimeDirectory = "socat-sonarr";
DynamicUser = true;
UMask = "000";
NetworkNamespacePath = "/var/run/netns/wg";
ExecStart = "${pkgs.socat}/bin/socat -d -d UNIX-LISTEN:/run/socat-sonarr/sonarr.sock,unlink-early,fork TCP4:127.0.0.1:8989";
Restart = "on-failure";
};
};
services.nginx.virtualHosts."sonarr.internal.kempkens.network" = { services.nginx.virtualHosts."sonarr.internal.kempkens.network" = {
quic = true; quic = true;
http3 = true; http3 = true;
@ -48,7 +30,8 @@
locations."/" = { locations."/" = {
recommendedProxySettings = true; recommendedProxySettings = true;
proxyPass = "http://unix:/run/socat-sonarr/sonarr.sock:/"; proxyPass = "http://192.168.42.2:8989";
proxyWebsockets = true;
}; };
}; };
} }