X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fisabelle%2Faten_integration.nix;fp=modules%2Fprivate%2Fwebsites%2Fisabelle%2Faten_integration.nix;h=288f20d04fa324564360458fbf12ccf80e014e6c;hp=7e0aaf726eeeda00285fedc0c5574cc1e03c85a9;hb=41cce84a02652e22ad967c9f31669092eb3e7f0e;hpb=750fe5a43b957b91a26069cf8a4fe19fc7b2633c diff --git a/modules/private/websites/isabelle/aten_integration.nix b/modules/private/websites/isabelle/aten_integration.nix index 7e0aaf7..288f20d 100644 --- a/modules/private/websites/isabelle/aten_integration.nix +++ b/modules/private/websites/isabelle/aten_integration.nix @@ -1,11 +1,7 @@ { 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 { @@ -20,11 +16,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 +48,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}" ''; @@ -60,7 +57,7 @@ in { certName = "integration"; addToCerts = true; hosts = [ "dev.aten.pro" ]; - root = app.webRoot; + root = webRoot; extraConfig = [ '' @@ -81,7 +78,7 @@ in { ErrorDocument 401 "" - + Options Indexes FollowSymLinks MultiViews Includes AllowOverride All Require all granted