infrastructure/machines/web03/django-apps/interludes.nix
Tom Hubrecht 32f13adaad
Some checks failed
Build all the nodes / bridge01 (push) Successful in 1m25s
Build all the nodes / geo02 (push) Successful in 1m34s
Build all the nodes / rescue01 (push) Successful in 1m34s
Build all the nodes / geo01 (push) Successful in 1m56s
Build all the nodes / compute01 (push) Successful in 2m22s
Build all the nodes / storage01 (push) Successful in 1m43s
Build all the nodes / web01 (push) Successful in 1m50s
Run pre-commit on all files / check (push) Successful in 25s
Build all the nodes / web02 (push) Successful in 1m54s
Build all the nodes / vault01 (push) Successful in 2m20s
Build all the nodes / web03 (push) Failing after 1m39s
feat(web03): Deploy interludes.webapps.dgnum.eu
2024-11-12 10:40:09 +01:00

59 lines
1.4 KiB
Nix

{
config,
pkgs,
sources,
...
}:
let
nix-pkgs = import sources.nix-pkgs { inherit pkgs; };
in
{
services.django-apps.sites.interludes = {
source = "https://git.eleves.ens.fr/dlesbre/site-interludes";
branch = "master";
domain = "interludes.webapps.dgnum.eu";
nginx = {
enableACME = true;
forceSSL = true;
};
webHookSecret = builtins.toFile "insecure-secret" "T5hNeDraMivRZLUkrekv&QeM";
application = {
type = "wsgi";
module = "interludes";
};
dbType = "sqlite";
python = pkgs.python3.override {
packageOverrides = _: _: { inherit (nix-pkgs) python-cas loadcredential; };
};
django = ps: ps.django_4;
dependencies = ps: [
ps.loadcredential
ps.python-ldap
ps.python-cas
];
credentials = {
SECRET_KEY = config.age.secrets."dj_interludes-secret_key_file".path;
EMAIL_HOST_PASSWORD = config.age.secrets."dj_interludes-email_host_password_file".path;
};
environment = {
INTERLUDES_ALLOWED_HOSTS = [ "interludes.webapps.dgnum.eu" ];
# E-mail configuration
INTERLUDES_SERVER_EMAIL = "noreply-interludes-admin@ens.fr";
INTERLUDES_DEFAULT_FROM_EMAIL = "noreply-interludes@ens.fr";
INTERLUDES_EMAIL_HOST = "clipper.ens.fr";
INTERLUDES_EMAIL_PORT = 465;
INTERLUDES_EMAIL_HOST_USER = "interludes";
};
};
}