feat(web03/gestiocof): Add passthrough for some clubs

This commit is contained in:
Tom Hubrecht 2025-01-17 09:18:56 +01:00
parent 383667f5f9
commit 02084b130f
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc

View file

@ -2,7 +2,11 @@
#
# SPDX-License-Identifier: EUPL-1.2
{ config, ... }:
{ config, lib, ... }:
let
inherit (lib) listToAttrs nameValuePair;
in
{
services.django-apps.sites.gestiocof = {
@ -14,10 +18,25 @@
enableACME = true;
forceSSL = true;
locations."/ws/" = {
proxyPass = "http://unix:/run/django-apps/gestiocof/socket";
proxyWebsockets = true;
};
locations =
{
"/ws/" = {
proxyPass = "http://unix:/run/django-apps/gestiocof/socket";
proxyWebsockets = true;
};
}
// (listToAttrs (
builtins.map (folder: nameValuePair "~ ^/${folder}/" { root = "/users/guests/cof/www/"; }) [
"arcanoid"
"cirque"
"pompom"
"trouveres"
]
));
extraConfig = ''
rewrite ^/$ /news;
'';
};
webHookSecret = config.age.secrets."webhook-gestiocof_token".path;