X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fisabelle%2Faten_integration.nix;h=c55ef929b202683fc7a660632ba2f6191e3024d8;hb=fa25ffd4583cc362075cd5e1b4130f33306103f0;hp=7e0aaf726eeeda00285fedc0c5574cc1e03c85a9;hpb=750fe5a43b957b91a26069cf8a4fe19fc7b2633c;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/isabelle/aten_integration.nix b/modules/private/websites/isabelle/aten_integration.nix index 7e0aaf7..c55ef92 100644 --- a/modules/private/websites/isabelle/aten_integration.nix +++ b/modules/private/websites/isabelle/aten_integration.nix @@ -1,18 +1,13 @@ { lib, pkgs, config, ... }: let secrets = config.myEnv.websites.isabelle.aten_integration; - app = pkgs.callPackage ./aten_app { - composerEnv = pkgs.composerEnv.override { php = pkgs.php72; }; - environment = secrets.environment; - varDir = "/var/lib/isabelle_aten_integration"; - }; + webRoot = "/var/lib/ftp/immae/aten/public"; cfg = config.myServices.websites.isabelle.aten_integration; pcfg = config.services.phpApplication; in { options.myServices.websites.isabelle.aten_integration.enable = lib.mkEnableOption "enable Aten's website in integration"; config = lib.mkIf cfg.enable { - services.duplyBackup.profiles.isabelle_aten_integration.rootDir = app.varDir; services.phpApplication.apps.isabelle_aten_integration = { websiteEnv = "integration"; httpdUser = config.services.httpd.Inte.user; @@ -20,11 +15,12 @@ in { httpdWatchFiles = [ config.secrets.fullPaths."websites/isabelle/aten_integration" ]; - inherit (app) webRoot varDir; - inherit app; + inherit webRoot; + varDir = "/var/lib/ftp/immae/aten_var"; + app = "/var/lib/ftp/immae/aten"; serviceDeps = [ "postgresql.service" ]; preStartActions = [ - "APP_ENV=${app.environment} ./bin/console --env=${app.environment} cache:clear --no-warmup" + "APP_ENV=dev ./bin/console --env=dev cache:clear --no-warmup" ]; phpOpenbasedir = [ "/tmp" ]; phpPool = { @@ -51,7 +47,7 @@ in { # vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php#parseDatabaseUrlQuery psql_url = with secrets.postgresql; "pdo-pgsql://${user}:${password}@invalid:${port}/${database}?host=${socket}"; in '' - SetEnv APP_ENV "${app.environment}" + SetEnv APP_ENV "dev" SetEnv APP_SECRET "${secrets.secret}" SetEnv DATABASE_URL "${psql_url}" ''; @@ -59,8 +55,8 @@ in { services.websites.env.integration.vhostConfs.isabelle_aten_integration = { certName = "integration"; addToCerts = true; - hosts = [ "dev.aten.pro" ]; - root = app.webRoot; + hosts = [ "aten.ic.immae.dev" ]; + root = webRoot; extraConfig = [ '' @@ -71,17 +67,17 @@ in { Use LDAPConnect - Require ldap-group cn=dev.aten.pro,cn=httpd,ou=services,dc=immae,dc=eu + Require ldap-group cn=ic.immae.dev,cn=httpd,ou=services,dc=immae,dc=eu ErrorDocument 401 "" Use LDAPConnect - Require ldap-group cn=dev.aten.pro,cn=httpd,ou=services,dc=immae,dc=eu + Require ldap-group cn=ic.immae.dev,cn=httpd,ou=services,dc=immae,dc=eu ErrorDocument 401 "" - + Options Indexes FollowSymLinks MultiViews Includes AllowOverride All Require all granted