forked from DGNum/infrastructure
chore(web02/cas-eleves): Factorize source and use host in ALLOWED_HOSTS
This commit is contained in:
parent
5cd85d38b1
commit
c4108a62ab
1 changed files with 7 additions and 5 deletions
|
@ -14,6 +14,9 @@ let
|
||||||
inherit (lib) mapAttrsToList;
|
inherit (lib) mapAttrsToList;
|
||||||
|
|
||||||
host = "cas.eleves.ens.fr";
|
host = "cas.eleves.ens.fr";
|
||||||
|
|
||||||
|
src = sources.cas-eleves;
|
||||||
|
|
||||||
port = 9889;
|
port = 9889;
|
||||||
|
|
||||||
python3 =
|
python3 =
|
||||||
|
@ -49,7 +52,7 @@ let
|
||||||
staticDrv = pkgs.stdenv.mkDerivation {
|
staticDrv = pkgs.stdenv.mkDerivation {
|
||||||
name = "cas_eleves-static";
|
name = "cas_eleves-static";
|
||||||
|
|
||||||
src = sources.cas-eleves;
|
inherit src;
|
||||||
|
|
||||||
nativeBuildInputs = [ pythonEnv ];
|
nativeBuildInputs = [ pythonEnv ];
|
||||||
|
|
||||||
|
@ -85,13 +88,12 @@ in
|
||||||
};
|
};
|
||||||
StateDirectory = "django-cas-eleves";
|
StateDirectory = "django-cas-eleves";
|
||||||
User = "cas_server";
|
User = "cas_server";
|
||||||
WorkingDirectory = sources.cas-eleves;
|
WorkingDirectory = src;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
CE_ALLOWED_HOSTS = builtins.toJSON [
|
CE_ALLOWED_HOSTS = builtins.toJSON [
|
||||||
"cas-eleves.dgnum.eu"
|
host
|
||||||
"cas.eleves.ens.fr"
|
|
||||||
];
|
];
|
||||||
CE_STATIC_ROOT = staticDrv;
|
CE_STATIC_ROOT = staticDrv;
|
||||||
};
|
};
|
||||||
|
@ -118,7 +120,7 @@ in
|
||||||
};
|
};
|
||||||
StateDirectory = "django-cas-eleves";
|
StateDirectory = "django-cas-eleves";
|
||||||
User = "cas_server";
|
User = "cas_server";
|
||||||
WorkingDirectory = sources.cas-eleves;
|
WorkingDirectory = src;
|
||||||
};
|
};
|
||||||
|
|
||||||
path = [ pythonEnv ];
|
path = [ pythonEnv ];
|
||||||
|
|
Loading…
Reference in a new issue