X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fprivate%2Fwebsites%2Fisabelle%2Faten_integration.nix;h=6f8f985af6ae77d71d6b1d12ca0be7a9c4d3b412;hb=ded643e14096a7cb166c78dd961cf68fb4ddb0cf;hp=a2a087cc339f1c7adff3eaf9d894d9ac92019fe5;hpb=0f71cd76014c2c4eb6756d8c04eb51b3e4452958;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 a2a087c..6f8f985 100644
--- a/modules/private/websites/isabelle/aten_integration.nix
+++ b/modules/private/websites/isabelle/aten_integration.nix
@@ -1,20 +1,24 @@
{ lib, pkgs, config, ... }:
let
secrets = config.myEnv.websites.isabelle.aten_integration;
- app = pkgs.webapps.aten.override { environment = secrets.environment; };
+ app = pkgs.callPackage ./aten_app {
+ composerEnv = pkgs.composerEnv.override { php = pkgs.php72; };
+ environment = secrets.environment;
+ varDir = "/var/lib/isabelle_aten_integration";
+ };
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.aten_dev.rootDir = app.varDir;
- services.phpApplication.apps.aten_dev = {
+ services.duplyBackup.profiles.isabelle_aten_integration.rootDir = app.varDir;
+ services.phpApplication.apps.isabelle_aten_integration = {
websiteEnv = "integration";
httpdUser = config.services.httpd.Inte.user;
httpdGroup = config.services.httpd.Inte.group;
httpdWatchFiles = [
- config.secrets.fullPaths."webapps/${app.environment}-aten"
+ config.secrets.fullPaths."websites/isabelle/aten_integration"
];
inherit (app) webRoot varDir;
inherit app;
@@ -23,19 +27,22 @@ in {
"APP_ENV=${app.environment} ./bin/console --env=${app.environment} cache:clear --no-warmup"
];
phpOpenbasedir = [ "/tmp" ];
- phpPool = ''
- php_admin_value[upload_max_filesize] = 20M
- php_admin_value[post_max_size] = 20M
- ;php_admin_flag[log_errors] = on
- pm = ondemand
- pm.max_children = 5
- pm.process_idle_timeout = 60
- env[SYMFONY_DEBUG_MODE] = "yes"
- '';
+ phpPool = {
+ "php_admin_value[upload_max_filesize]" = "20M";
+ "php_admin_value[post_max_size]" = "20M";
+ #"php_admin_flag[log_errors]" = "on";
+ "pm" = "ondemand";
+ "pm.max_children" = "5";
+ "pm.process_idle_timeout" = "60";
+ };
+ phpEnv = {
+ SYMFONY_DEBUG_MODE = "\"yes\"";
+ };
+ phpPackage = pkgs.php72;
};
secrets.keys = [{
- dest = "webapps/${app.environment}-aten";
+ dest = "websites/isabelle/aten_integration";
user = config.services.httpd.Inte.user;
group = config.services.httpd.Inte.group;
permissions = "0400";
@@ -50,18 +57,18 @@ in {
SetEnv DATABASE_URL "${psql_url}"
'';
}];
- services.websites.env.integration.vhostConfs.aten_dev = {
+ services.websites.env.integration.vhostConfs.isabelle_aten_integration = {
certName = "integration";
addToCerts = true;
hosts = [ "dev.aten.pro" ];
- root = pcfg.webappDirs.aten_dev;
+ root = pcfg.webappDirs.isabelle_aten_integration;
extraConfig = [
''
- SetHandler "proxy:unix:${pcfg.phpListenPaths.aten_dev}|fcgi://localhost"
+ SetHandler "proxy:unix:${pcfg.phpListenPaths.isabelle_aten_integration}|fcgi://localhost"
- Include ${config.secrets.fullPaths."webapps/${app.environment}-aten"}
+ Include ${config.secrets.fullPaths."websites/isabelle/aten_integration"}
Use LDAPConnect
@@ -75,7 +82,7 @@ in {
ErrorDocument 401 ""
-
+
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Require all granted