Refactor
This commit is contained in:
@@ -15,40 +15,40 @@ let
|
||||
};
|
||||
};
|
||||
in {
|
||||
sops = true;
|
||||
db = true;
|
||||
paths = [{
|
||||
path = "${serverCfg.path.config}/umami/";
|
||||
mode = "0444";
|
||||
}];
|
||||
|
||||
containers = {
|
||||
server = builder.mkContainer {
|
||||
subdomain = containerCfg.subdomain;
|
||||
image = "${pkgs.umami.name}:${pkgs.umami.version}";
|
||||
imageStream = image;
|
||||
port = 3000;
|
||||
secret = name;
|
||||
extraEnv = {
|
||||
PORT = "3000";
|
||||
# HOSTNAME = "${containerCfg.subdomain}.${serverCfg.domain}";
|
||||
DATABASE_TYPE = "postgresql";
|
||||
REDIS_URL = "redis://${builder.host}";
|
||||
CLIENT_IP_HEADER = "X-Forwarded-For";
|
||||
BASE_PATH = lib.optionalString (containerCfg.subpath or null != null) "/${containerCfg.subpath}";
|
||||
# DISABLE_LOGIN = "1";#(if serverCfg.containers?authentik then "1" else "0");
|
||||
|
||||
};
|
||||
extraLabels = { } // ( if serverCfg.containers?authentik then {
|
||||
"traefik.http.routers.${containerCfg.subdomain}.middlewares" = if serverCfg.containers?authentik then "authentik" else "";
|
||||
} else {});
|
||||
extraOptions = [
|
||||
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
||||
];
|
||||
overrides = {
|
||||
cmd = [ "start" ]; # Specific command for the umami binary
|
||||
};
|
||||
};
|
||||
requires = {
|
||||
secrets = [ name ];
|
||||
databases = [ name ];
|
||||
};
|
||||
|
||||
}
|
||||
runtime = {
|
||||
paths = [{
|
||||
path = "${serverCfg.path.config}/umami/";
|
||||
mode = "0444";
|
||||
}];
|
||||
|
||||
containers = {
|
||||
server = builder.mkContainer {
|
||||
authentik = true;
|
||||
tmpfs = true;
|
||||
subdomain = containerCfg.subdomain;
|
||||
image = "${pkgs.umami.name}:${pkgs.umami.version}";
|
||||
imageStream = image;
|
||||
port = 3000;
|
||||
secret = name;
|
||||
extraEnv = {
|
||||
PORT = "3000";
|
||||
# HOSTNAME = "${containerCfg.subdomain}.${serverCfg.domain}";
|
||||
DATABASE_TYPE = "postgresql";
|
||||
REDIS_URL = "redis://${builder.host}";
|
||||
CLIENT_IP_HEADER = "X-Forwarded-For";
|
||||
BASE_PATH = lib.optionalString (containerCfg.subpath or null != null) "/${containerCfg.subpath}";
|
||||
# DISABLE_LOGIN = "1";#(if serverCfg.containers?authentik then "1" else "0");
|
||||
|
||||
};
|
||||
overrides = {
|
||||
cmd = [ "start" ]; # Specific command for the umami binary
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user