Make Traefik and Forgejo communicate with each other!

This commit is contained in:
Root User 2026-02-06 15:53:58 +01:00
parent 4404dff982
commit 140d305a76
Signed by: root
GPG key ID: 087F0A95E5766D72
2 changed files with 22 additions and 6 deletions

View file

@ -163,8 +163,8 @@ in {
settings = {
server = {
DOMAIN = "git.prg.local";
ROOT_URL = "http://${srv.DOMAIN}/";
DOMAIN = "git.prg-radio.org";
ROOT_URL = "https://git.prg-radio.org/";
HTTP_PORT = 3000;
# SSH integration
SSH_PORT = lib.head config.services.openssh.ports;

View file

@ -186,8 +186,24 @@ in {
}
];
http.routers = {};
http.services = {};
# HTTP Routers
http.routers = {
forgejo = {
rule = "Host(`git.prg-radio.org`)";
service = "forgejo";
entryPoints = ["websecure"];
tls = {};
};
};
# HTTP Services
http.services = {
forgejo.loadBalancer = {
servers = [
{ url = "http://10.1.1.4:3000"; }
];
};
};
};
};
@ -351,8 +367,8 @@ in {
'';
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 443 ];
networking.firewall.allowedUDPPorts = [ 443 ];
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 80 443 ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;