masive rewriting and setup of server files
This commit is contained in:
@@ -2,19 +2,19 @@
|
||||
lib,
|
||||
config,
|
||||
proxyReverse,
|
||||
setup,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = 8765;
|
||||
url = "tracker.${config.my.domain}";
|
||||
cfg = config.my.servers.ryot;
|
||||
in
|
||||
{
|
||||
options.my.servers.ryot.enable = lib.mkEnableOption "enable";
|
||||
options.my.servers.ryot = setup.mkOptions "ryot" "tracker" 8765;
|
||||
config = lib.mkIf (config.my.servers.ryot.enable && config.my.servers.postgres.enable) {
|
||||
sops.secrets.ryot.sopsFile = ../../secrets/env.yaml;
|
||||
virtualisation.oci-containers.containers.ryot = {
|
||||
image = "ghcr.io/ignisda/ryot:v7.0.0";
|
||||
ports = [ "${toString port}:8000" ];
|
||||
ports = [ "${toString cfg.port}:8000" ];
|
||||
environmentFiles = [ config.sops.secrets.ryot.path ];
|
||||
environment = {
|
||||
RUST_LOG = "ryot=debug,sea_orm=debug";
|
||||
@@ -26,10 +26,12 @@ in
|
||||
labels = {
|
||||
"flame.type" = "application";
|
||||
"flame.name" = "Ryot";
|
||||
"flame.url" = url;
|
||||
"flame.url" = cfg.url;
|
||||
"flame.icon" = "radar";
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."tracker.${config.my.domain}" = proxyReverse port // { };
|
||||
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
||||
proxyReverse cfg.hostName cfg.port // { }
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user