From 8cce7e19cbf73c90a16df69eb048f40acbe05810 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 26 Sep 2023 20:46:38 +0200 Subject: [PATCH] fix(ds-fr): Switch to local storage Also disable France Connect login --- machines/compute01/ds-fr/default.nix | 13 ++++--------- machines/compute01/ds-fr/module.nix | 1 + machines/compute01/ds-fr/package/default.nix | 3 ++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/machines/compute01/ds-fr/default.nix b/machines/compute01/ds-fr/default.nix index ef318a0..062e156 100644 --- a/machines/compute01/ds-fr/default.nix +++ b/machines/compute01/ds-fr/default.nix @@ -17,14 +17,12 @@ in { settings = { APP_HOST = host; - # TODO: use France Connect ? + # Disable France Connect and Agent Connect FRANCE_CONNECT_ENABLED = "disabled"; - FC_PARTICULIER_ID = "demarches_dgn"; - FC_PARTICULIER_SECRET = "JD2MKKR3aMapqk1f27AcMZMy8sTW7ypRkqcegvf5TUy8bMRp"; - FC_PARTICULIER_BASE_URL = "https://sso.dgnum.eu"; + AGENT_CONNECT_ENABLED = "disabled"; # S3 storage setup - ACTIVE_STORAGE_SERVICE = "garage"; + ACTIVE_STORAGE_SERVICE = "local"; S3_ENDPOINT = "https://s3.dgnum.eu"; S3_BUCKET = "demarches-dgnum"; S3_REGION = "garage"; @@ -39,9 +37,6 @@ in { APPLICATION_SHORTNAME = "d-s.dgnum.eu"; APPLICATION_BASE_URL = "https://${host}"; - # Deactivate connexion methods - AGENT_CONNECT_ENABLED = "disabled"; - # SMTP setup, TODO: Fix and stop using sendmail CLASSIC_SMTP_ENABLED = "enabled"; SMTP_HOST = "kurisu.lahfa.xyz"; @@ -57,7 +52,7 @@ in { EQUIPE_EMAIL = "equipe@infra.dgnum.eu"; TECH_EMAIL = "tech@infra.dgnum.eu"; NO_REPLY_EMAIL = - ''"Ne pas répondre <@infra.dgnum.eu>"''; + ''"Ne pas répondre "''; OLD_CONTACT_EMAIL = ""; CONTACT_PHONE = ""; diff --git a/machines/compute01/ds-fr/module.nix b/machines/compute01/ds-fr/module.nix index 9bccd53..d200cbf 100644 --- a/machines/compute01/ds-fr/module.nix +++ b/machines/compute01/ds-fr/module.nix @@ -285,6 +285,7 @@ in { "f '${cfg.logDir}/production.log' 0640 ${cfg.user} ${cfg.group} - -" "f '${cfg.dataDir}/.env' 0600 ${cfg.user} ${cfg.group} - -" "d '${cfg.dataDir}/tmp' 0700 ${cfg.user} ${cfg.group} 10d -" + "d '${cfg.dataDir}/storage' 0700 ${cfg.user} ${cfg.group} - -" ]; systemd.services = { diff --git a/machines/compute01/ds-fr/package/default.nix b/machines/compute01/ds-fr/package/default.nix index 919411b..0f4d48c 100644 --- a/machines/compute01/ds-fr/package/default.nix +++ b/machines/compute01/ds-fr/package/default.nix @@ -97,9 +97,10 @@ in stdenv.mkDerivation { patchShebangs bin/ - rm -rf log + rm -rf log storage ln -s ${logDir} log ln -s ${dataDir}/tmp tmp + ln -s ${dataDir}/storage storage for f in $(ls lib/tasks/deployment/); do [[ ! ${initialDeploymentDate} < $f ]] \