forked from DGNum/infrastructure
feat(web03/gestiocof): Add passthrough for some clubs
This commit is contained in:
parent
383667f5f9
commit
02084b130f
1 changed files with 24 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue