mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-10-21 03:15:46 +02:00
Compare commits
3 commits
0ebf6007b7
...
11a870a60f
| Author | SHA1 | Date | |
|---|---|---|---|
| 11a870a60f | |||
| c5bf309d5b | |||
| 9b7d1ca52d |
1 changed files with 40 additions and 66 deletions
|
|
@ -58,12 +58,12 @@ in {
|
||||||
TARGET = " ";
|
TARGET = " ";
|
||||||
|
|
||||||
# Configure redirect domains - ALL domains that should be able to redirect back after challenge
|
# Configure redirect domains - ALL domains that should be able to redirect back after challenge
|
||||||
REDIRECT_DOMAINS = "prg-radio.org,git.prg-radio.org,wavelog.prg-radio.org,partdb.prg-radio.org,anubis.prg-radio.org";
|
REDIRECT_DOMAINS = "prg-radio.org,anubis.prg-radio.org,git.prg-radio.org,lgbtq.prg-radio.org,wavelog.prg-radio.org,partdb.prg-radio.org";
|
||||||
|
|
||||||
# Public URL for Anubis
|
# Public URL for Anubis
|
||||||
PUBLIC_URL = "https://anubis.prg-radio.org";
|
PUBLIC_URL = "https://anubis.prg-radio.org";
|
||||||
|
|
||||||
# Cookie domain for proper scoping (leading dot for all subdomains)
|
# Cookie domain for proper scoping
|
||||||
COOKIE_DOMAIN = ".prg-radio.org";
|
COOKIE_DOMAIN = ".prg-radio.org";
|
||||||
|
|
||||||
# Difficulty level
|
# Difficulty level
|
||||||
|
|
@ -76,57 +76,21 @@ in {
|
||||||
# Optional: webmaster email for error pages
|
# Optional: webmaster email for error pages
|
||||||
WEBMASTER_EMAIL = "dtu.prg@gmail.com";
|
WEBMASTER_EMAIL = "dtu.prg@gmail.com";
|
||||||
|
|
||||||
|
# Prevents infinite loop of doom:
|
||||||
|
# See: https://github.com/TecharoHQ/anubis/issues/970
|
||||||
|
JWT_RESTRICTION_HEADER="CF-Connecting-IP";
|
||||||
|
|
||||||
# Metrics on separate port
|
# Metrics on separate port
|
||||||
METRICS_BIND_NETWORK = "tcp";
|
METRICS_BIND_NETWORK = "tcp";
|
||||||
METRICS_BIND = "127.0.0.1:8091";
|
METRICS_BIND = "127.0.0.1:8091";
|
||||||
|
|
||||||
|
SLOG_LEVEL = "DEBUG";
|
||||||
|
|
||||||
|
COOKIE_SECURE = true;
|
||||||
|
COOKIE_SAME_SITE = "None"; # Only if Secure=true and you need cross-site
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Per-service Anubis instances (reverse-proxy mode) ---------------------------
|
|
||||||
forgejo = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
BIND_NETWORK = "tcp";
|
|
||||||
BIND = "127.0.0.1:8092";
|
|
||||||
TARGET = "http://10.1.1.4:3000"; # Forgejo backend
|
|
||||||
DIFFICULTY = 20;
|
|
||||||
SERVE_ROBOTS_TXT = true;
|
|
||||||
WEBMASTER_EMAIL = "dtu.prg@gmail.com";
|
|
||||||
METRICS_BIND_NETWORK = "tcp";
|
|
||||||
METRICS_BIND = "127.0.0.1:8095";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
wavelog = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
BIND_NETWORK = "tcp";
|
|
||||||
BIND = "127.0.0.1:8093";
|
|
||||||
TARGET = "http://10.1.1.249:8086"; # Wavelog backend
|
|
||||||
DIFFICULTY = 20;
|
|
||||||
SERVE_ROBOTS_TXT = true;
|
|
||||||
WEBMASTER_EMAIL = "dtu.prg@gmail.com";
|
|
||||||
METRICS_BIND_NETWORK = "tcp";
|
|
||||||
METRICS_BIND = "127.0.0.1:8096";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
# This part needs investigating
|
|
||||||
partdb = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
BIND_NETWORK = "tcp";
|
|
||||||
BIND = "127.0.0.1:8094";
|
|
||||||
TARGET = "http://10.1.1.249:8087"; # PartDB backend
|
|
||||||
DIFFICULTY = 20;
|
|
||||||
SERVE_ROBOTS_TXT = true;
|
|
||||||
WEBMASTER_EMAIL = "dtu.prg@gmail.com";
|
|
||||||
METRICS_BIND_NETWORK = "tcp";
|
|
||||||
METRICS_BIND = "127.0.0.1:8097";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -190,29 +154,39 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
http.routers = {
|
# Traefik middlewares: Anubis forwardAuth
|
||||||
#anubis-api = {
|
http.middlewares = {
|
||||||
# rule = "Host(`anubis.prg-radio.org`) && PathPrefix(`/.within.website/x/cmd/anubis/api`)";
|
anubisForwardAuth = {
|
||||||
# service = "anubis";
|
forwardAuth = {
|
||||||
# entryPoints = ["websecure"];
|
# point at the Anubis check endpoint (the subrequest/UI instance)
|
||||||
# priority = 200;
|
address = "http://127.0.0.1:8090/.within.website/x/cmd/anubis/api/check";
|
||||||
# tls = {};
|
};
|
||||||
# };
|
};
|
||||||
|
redirect-to-https = {
|
||||||
|
redirectScheme = {
|
||||||
|
scheme = "https";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
http.routers = {
|
||||||
# Anubis router (for challenge page)
|
# Anubis router (for challenge page)
|
||||||
anubis = {
|
anubis = {
|
||||||
rule = "Host(`anubis.prg-radio.org`)";
|
rule = "Host(`anubis.prg-radio.org`)";
|
||||||
service = "anubis";
|
service = "anubis";
|
||||||
entryPoints = [ "websecure" ];
|
entryPoints = [ "websecure" ];
|
||||||
tls = {};
|
tls = {
|
||||||
|
certresolver = "acme";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Protected service example: Forgejo
|
# Protected service example: Forgejo (attach Anubis forwardAuth middleware)
|
||||||
forgejo = {
|
forgejo = {
|
||||||
rule = "Host(`git.prg-radio.org`)";
|
rule = "Host(`git.prg-radio.org`)";
|
||||||
service = "forgejo";
|
service = "forgejo";
|
||||||
entryPoints = [ "websecure" ];
|
entryPoints = [ "websecure" ];
|
||||||
tls = {};
|
tls = {};
|
||||||
|
middlewares = [ "anubisForwardAuth" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Matrix HTTP router for client requests (Element etc.)
|
# Matrix HTTP router for client requests (Element etc.)
|
||||||
|
|
@ -237,6 +211,7 @@ in {
|
||||||
service = "partdb";
|
service = "partdb";
|
||||||
entryPoints = [ "websecure" ];
|
entryPoints = [ "websecure" ];
|
||||||
tls = {};
|
tls = {};
|
||||||
|
middlewares = [ "anubisForwardAuth" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -246,12 +221,11 @@ in {
|
||||||
servers = [
|
servers = [
|
||||||
{url = "http://127.0.0.1:8090";}
|
{url = "http://127.0.0.1:8090";}
|
||||||
];
|
];
|
||||||
#passHostHeader = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
forgejo.loadBalancer = {
|
forgejo.loadBalancer = {
|
||||||
servers = [
|
servers = [
|
||||||
{url = "http://127.0.0.1:8092";}
|
{url = "http://10.1.1.4:3000";}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
matrix.loadBalancer = {
|
matrix.loadBalancer = {
|
||||||
|
|
@ -267,7 +241,7 @@ in {
|
||||||
|
|
||||||
partdb.loadBalancer = {
|
partdb.loadBalancer = {
|
||||||
servers = [
|
servers = [
|
||||||
{url = "http://127.0.0.1:8094";}
|
{url = "http://10.1.1.249:8087";}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue