Server: move services to subdomains
This commit is contained in:
parent
5a52fd9f3a
commit
1a84aa2290
3 changed files with 17 additions and 22 deletions
|
|
@ -9,31 +9,27 @@
|
|||
server = {
|
||||
#server.SSH_PORT = 69;
|
||||
DISABLE_REGISTRATION = lib.mkDefault true;
|
||||
ROOT_URL = "http://everest/gitea/";
|
||||
ROOT_URL = "http://git.everest.sable-pancake.ts.net";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Add a cname for gitea
|
||||
services.dnsmasq.settings.cname = [ "git.everest.sable-pancake.ts.net,everest" ];
|
||||
|
||||
# Set up traefik as the reverse proxy for Gitea
|
||||
services.traefik = {
|
||||
dynamicConfigOptions = {
|
||||
http = {
|
||||
routers = {
|
||||
/*
|
||||
Gitea works best as a subdomain, but I do not have a dns server (yet),
|
||||
and since tailscale doesn't support adding subdomains with MagicDNS I'll
|
||||
just put it in a subpath for now
|
||||
*/
|
||||
gitea-subpath = {
|
||||
middlewares = [ "gitea-strip-prefix" ];
|
||||
rule = "PathPrefix(`/gitea`)";
|
||||
rule = "Host(`git.everest.sable-pancake.ts.net`)";
|
||||
service = "gitea";
|
||||
};
|
||||
};
|
||||
services.gitea.loadBalancer.servers = [
|
||||
{ url = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}"; }
|
||||
];
|
||||
# Gitea freaks out if you don't remove the subpath it's being proxied from
|
||||
middlewares.gitea-strip-prefix.stripprefix.prefixes = "/gitea";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue