server7: Move hydra proxy to a container
This commit is contained in:
parent
a1656f9553
commit
2249553661
|
@ -13,6 +13,7 @@ rec {
|
|||
|
||||
hydra.publicKey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhurL/sxsXRglKdLfiWIcK+iqpyhGrGt/MoBODsgvig";
|
||||
hydra7 = { };
|
||||
mpd-index = { };
|
||||
nfs = { };
|
||||
ncdc.publicKey =
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
yggaddr = import ../yggaddr.nix;
|
||||
|
||||
containerFunc = name:
|
||||
# Generate a container expression from the directory at `name`.
|
||||
{
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
name:
|
||||
|
||||
let port = 3000;
|
||||
in (import ../outer-defaults.nix name) // {
|
||||
|
||||
bindMounts."/srv/c3d2" = {
|
||||
hostPath = "/srv/ceph/c3d2";
|
||||
isReadOnly = false;
|
||||
};
|
||||
|
||||
ephemeral = true;
|
||||
|
||||
forwardPorts = [{
|
||||
containerPort = port;
|
||||
hostPort = port;
|
||||
protocol = "tcp";
|
||||
}];
|
||||
|
||||
config = { config, pkgs, lib, ... }: {
|
||||
imports = [ ../inner-defaults.nix ];
|
||||
networking.firewall.enable = false;
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"hydra7.y.c3d2.de" = {
|
||||
default = true;
|
||||
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue