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;
|
||||
|
||||
host = "cas.eleves.ens.fr";
|
||||
|
||||
src = sources.cas-eleves;
|
||||
|
||||
port = 9889;
|
||||
|
||||
python3 =
|
||||
|
@ -49,7 +52,7 @@ let
|
|||
staticDrv = pkgs.stdenv.mkDerivation {
|
||||
name = "cas_eleves-static";
|
||||
|
||||
src = sources.cas-eleves;
|
||||
inherit src;
|
||||
|
||||
nativeBuildInputs = [ pythonEnv ];
|
||||
|
||||
|
@ -85,13 +88,12 @@ in
|
|||
};
|
||||
StateDirectory = "django-cas-eleves";
|
||||
User = "cas_server";
|
||||
WorkingDirectory = sources.cas-eleves;
|
||||
WorkingDirectory = src;
|
||||
};
|
||||
|
||||
environment = {
|
||||
CE_ALLOWED_HOSTS = builtins.toJSON [
|
||||
"cas-eleves.dgnum.eu"
|
||||
"cas.eleves.ens.fr"
|
||||
host
|
||||
];
|
||||
CE_STATIC_ROOT = staticDrv;
|
||||
};
|
||||
|
@ -118,7 +120,7 @@ in
|
|||
};
|
||||
StateDirectory = "django-cas-eleves";
|
||||
User = "cas_server";
|
||||
WorkingDirectory = sources.cas-eleves;
|
||||
WorkingDirectory = src;
|
||||
};
|
||||
|
||||
path = [ pythonEnv ];
|
||||
|
|
Loading…
Reference in a new issue