services: init loadbalancers, forgejo, etc
This commit is contained in:
parent
e0bbc198a7
commit
82cfd6220b
8 changed files with 61 additions and 14 deletions
|
@ -6,5 +6,6 @@
|
|||
./hugo.nix
|
||||
./stash.nix
|
||||
./foundryvtt.nix
|
||||
./forgejo.nix
|
||||
];
|
||||
}
|
||||
|
|
16
modules/services/forgejo.nix
Normal file
16
modules/services/forgejo.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}: {
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
package = pkgs.forgejo;
|
||||
stateDir = "/sakura/forjo";
|
||||
settings = {
|
||||
# service.DISABLE_REGISTRATION = true;
|
||||
server = {
|
||||
HTTP_PORT = 3000;
|
||||
DOMAIN = "git.notohh.dev";
|
||||
ROOT_URL = "https://git.notohh.dev";
|
||||
LANDING_PAGE = "/explore/repos";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -10,5 +10,8 @@
|
|||
/run/secrets/foundry-username
|
||||
/run/secrets/foundry-password
|
||||
];
|
||||
ports = [
|
||||
"30000:30000"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{pkgs, ...}: {
|
||||
{config, ...}: {
|
||||
virtualisation.oci-containers.containers.homepage = {
|
||||
image = "ghcr.io/benphelps/homepage";
|
||||
volumes = [
|
||||
"/home/notoh/docker/homepage:/app/config"
|
||||
"/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
];
|
||||
ports = [
|
||||
"3005:3000"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,5 +6,8 @@
|
|||
volumes = [
|
||||
"/home/notoh/docker/hugo:/src"
|
||||
];
|
||||
ports = [
|
||||
"1313:1313"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,5 +7,8 @@
|
|||
environment = {
|
||||
INSTANCE_NAME = "SearXNG";
|
||||
};
|
||||
ports = [
|
||||
"8085:8080"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,5 +16,8 @@
|
|||
"/home/notoh/docker/stash/cache:/cache"
|
||||
"/home/notoh/docker/stash/generated:/generated"
|
||||
];
|
||||
ports = [
|
||||
"9999:9999"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,9 +12,16 @@
|
|||
};
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
group = "docker";
|
||||
dynamicConfigOptions = {
|
||||
http = {
|
||||
services = {
|
||||
homepage.loadBalancer.servers = [{url = "http://localhost:3005";}];
|
||||
searxng.loadBalancer.servers = [{url = "http://localhost:8085";}];
|
||||
hugo.loadBalancer.servers = [{url = "http://localhost:1313";}];
|
||||
stash.loadBalancer.servers = [{url = "http://localhost:9999";}];
|
||||
foundryvtt.loadBalancer.servers = [{url = "http://localhost:30000";}];
|
||||
gitea.loadBalancer.servers = [{url = "http://localhost:3000";}];
|
||||
};
|
||||
routers = {
|
||||
api = {
|
||||
rule = "PathPrefix(`/api/`)";
|
||||
|
@ -24,29 +31,36 @@
|
|||
homepage = {
|
||||
rule = "Host(`dashboard.lab`)";
|
||||
entrypoints = ["web"];
|
||||
service = "homepage@docker";
|
||||
service = "homepage";
|
||||
};
|
||||
searxng = {
|
||||
rule = "Host(`searxng.lab`)";
|
||||
entrypoints = ["web"];
|
||||
service = "searxng@docker";
|
||||
};
|
||||
hugo = {
|
||||
rule = "Host(`notohh.dev`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "hugo@docker";
|
||||
tls.domains = [{main = "*.notohh.dev";}];
|
||||
tls.certresolver = "staging";
|
||||
service = "searxng";
|
||||
};
|
||||
stash = {
|
||||
rule = "Host(`stash.lab`)";
|
||||
entrypoints = ["web"];
|
||||
service = "stash@docker";
|
||||
service = "stash";
|
||||
};
|
||||
hugo = {
|
||||
rule = "Host(`notohh.dev`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "hugo";
|
||||
tls.domains = [{main = "*.notohh.dev";}];
|
||||
tls.certresolver = "staging";
|
||||
};
|
||||
foundryvtt = {
|
||||
rule = "Host(`foundry.notohh.dev`)";
|
||||
entrypoints = ["websecure"];
|
||||
service = "foundryvtt@docker";
|
||||
service = "foundryvtt";
|
||||
tls.domains = [{main = "*.notohh.dev";}];
|
||||
tls.certresolver = "staging";
|
||||
};
|
||||
gitea = {
|
||||
rule = "Host(`git.notohh.dev`)";
|
||||
entrypoints = ["websecure"];
|
||||
service = "gitea";
|
||||
tls.domains = [{main = "*.notohh.dev";}];
|
||||
tls.certresolver = "staging";
|
||||
};
|
||||
|
@ -57,7 +71,6 @@
|
|||
log.level = "DEBUG";
|
||||
api.dashboard = true;
|
||||
api.insecure = true;
|
||||
providers.docker = true;
|
||||
global = {
|
||||
checkNewVersion = false;
|
||||
sendAnonymousUsage = false;
|
||||
|
@ -73,6 +86,7 @@
|
|||
caServer = "https://acme-staging-v02.api.letsencrypt.org/directory";
|
||||
dnsChallenge = {
|
||||
provider = "cloudflare";
|
||||
resolvers = ["1.1.1.1:53" "1.0.0.1:53"];
|
||||
delayBeforeCheck = "0";
|
||||
};
|
||||
};
|
||||
|
@ -82,6 +96,7 @@
|
|||
caServer = "https://acme-v02.api.letsencrypt.org/directory";
|
||||
dnsChallenge = {
|
||||
provider = "cloudflare";
|
||||
resolvers = ["1.1.1.1:53" "1.0.0.1:53"];
|
||||
delayBeforeCheck = "0";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue