[gitea] Moves database password into an sops secret
This commit is contained in:
@@ -1,14 +1,36 @@
|
||||
config:
|
||||
let
|
||||
hostRule = host: "Host(`${host}.${config.domainName}`)";
|
||||
localNetRule = "ClientIP(`${config.localNet}`)";
|
||||
localHostRule = host: "${localNetRule} && ${hostRule host}";
|
||||
havenisms = "havenisms.com";
|
||||
blazestar = "blazestar.net";
|
||||
hostRule = host: domain: "Host(`${host}.${domain}`)";
|
||||
hostRuleHavenisms = host: hostRule host havenisms;
|
||||
localNet = "192.168.0.0/16";
|
||||
localNetRule = "ClientIP(`${localNet}`)";
|
||||
localHostRule = host: domain: "${localNetRule} && ${hostRule host domain}";
|
||||
localHostRuleHavenisms = host: localHostRule host havenisms;
|
||||
in
|
||||
{
|
||||
inherit hostRule localNetRule localHostRule;
|
||||
inherit
|
||||
hostRule
|
||||
localHostRule
|
||||
hostRuleHavenisms
|
||||
localHostRuleHavenisms
|
||||
havenisms
|
||||
blazestar;
|
||||
|
||||
mkContainer = { image, dependsOn ? [], hostName, port, volumes ? [], environment ? [], homepageOpts, public ? false}:
|
||||
let routerRule = if public then hostRule hostName else localHostRule hostName;
|
||||
|
||||
mkContainer = {
|
||||
image,
|
||||
hostName,
|
||||
port,
|
||||
homepageOpts,
|
||||
dependsOn ? [],
|
||||
domain ? havenisms,
|
||||
volumes ? [],
|
||||
environment ? [],
|
||||
public ? false
|
||||
}:
|
||||
let routerRule = if public then hostRule hostName domain else localHostRule hostName domain;
|
||||
in
|
||||
{
|
||||
image = image;
|
||||
@@ -21,10 +43,10 @@ in
|
||||
"-l=homepage.group=${homepageOpts.group}"
|
||||
"-l=homepage.name=${homepageOpts.name}"
|
||||
"-l=homepage.icon=${homepageOpts.icon}"
|
||||
"-l=homepage.href=https://${hostName}.${config.domainName}"
|
||||
"-l=homepage.href=https://${hostName}.${domain}"
|
||||
"-l=homepage.description=${homepageOpts.description}"
|
||||
];
|
||||
volumes = volumes;
|
||||
environment = environment;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user