diff options
Diffstat (limited to 'modules/private/websites/isabelle')
4 files changed, 46 insertions, 46 deletions
diff --git a/modules/private/websites/isabelle/aten_integration.nix b/modules/private/websites/isabelle/aten_integration.nix index a2a087c..fb6eda9 100644 --- a/modules/private/websites/isabelle/aten_integration.nix +++ b/modules/private/websites/isabelle/aten_integration.nix | |||
@@ -23,15 +23,17 @@ in { | |||
23 | "APP_ENV=${app.environment} ./bin/console --env=${app.environment} cache:clear --no-warmup" | 23 | "APP_ENV=${app.environment} ./bin/console --env=${app.environment} cache:clear --no-warmup" |
24 | ]; | 24 | ]; |
25 | phpOpenbasedir = [ "/tmp" ]; | 25 | phpOpenbasedir = [ "/tmp" ]; |
26 | phpPool = '' | 26 | phpPool = { |
27 | php_admin_value[upload_max_filesize] = 20M | 27 | "php_admin_value[upload_max_filesize]" = "20M"; |
28 | php_admin_value[post_max_size] = 20M | 28 | "php_admin_value[post_max_size]" = "20M"; |
29 | ;php_admin_flag[log_errors] = on | 29 | #"php_admin_flag[log_errors]" = "on"; |
30 | pm = ondemand | 30 | "pm" = "ondemand"; |
31 | pm.max_children = 5 | 31 | "pm.max_children" = "5"; |
32 | pm.process_idle_timeout = 60 | 32 | "pm.process_idle_timeout" = "60"; |
33 | env[SYMFONY_DEBUG_MODE] = "yes" | 33 | }; |
34 | ''; | 34 | phpEnv = { |
35 | SYMFONY_DEBUG_MODE = "yes"; | ||
36 | }; | ||
35 | }; | 37 | }; |
36 | 38 | ||
37 | secrets.keys = [{ | 39 | secrets.keys = [{ |
diff --git a/modules/private/websites/isabelle/aten_production.nix b/modules/private/websites/isabelle/aten_production.nix index 8e33f0f..cf7e4a2 100644 --- a/modules/private/websites/isabelle/aten_production.nix +++ b/modules/private/websites/isabelle/aten_production.nix | |||
@@ -24,16 +24,16 @@ in { | |||
24 | "APP_ENV=${app.environment} ./bin/console --env=${app.environment} cache:clear --no-warmup" | 24 | "APP_ENV=${app.environment} ./bin/console --env=${app.environment} cache:clear --no-warmup" |
25 | ]; | 25 | ]; |
26 | phpOpenbasedir = [ "/tmp" ]; | 26 | phpOpenbasedir = [ "/tmp" ]; |
27 | phpPool = '' | 27 | phpPool = { |
28 | php_admin_value[upload_max_filesize] = 20M | 28 | "php_admin_value[upload_max_filesize]" = "20M"; |
29 | php_admin_value[post_max_size] = 20M | 29 | "php_admin_value[post_max_size]" = "20M"; |
30 | ;php_admin_flag[log_errors] = on | 30 | #"php_admin_flag[log_errors]" = "on"; |
31 | pm = dynamic | 31 | "pm" = "dynamic"; |
32 | pm.max_children = 20 | 32 | "pm.max_children" = "20"; |
33 | pm.start_servers = 2 | 33 | "pm.start_servers" = "2"; |
34 | pm.min_spare_servers = 1 | 34 | "pm.min_spare_servers" = "1"; |
35 | pm.max_spare_servers = 3 | 35 | "pm.max_spare_servers" = "3"; |
36 | ''; | 36 | }; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | secrets.keys = [{ | 39 | secrets.keys = [{ |
diff --git a/modules/private/websites/isabelle/iridologie.nix b/modules/private/websites/isabelle/iridologie.nix index 460bd2a..ffbf259 100644 --- a/modules/private/websites/isabelle/iridologie.nix +++ b/modules/private/websites/isabelle/iridologie.nix | |||
@@ -19,8 +19,9 @@ in { | |||
19 | systemd.services.phpfpm-iridologie.after = lib.mkAfter iridologie.phpFpm.serviceDeps; | 19 | systemd.services.phpfpm-iridologie.after = lib.mkAfter iridologie.phpFpm.serviceDeps; |
20 | systemd.services.phpfpm-iridologie.wants = iridologie.phpFpm.serviceDeps; | 20 | systemd.services.phpfpm-iridologie.wants = iridologie.phpFpm.serviceDeps; |
21 | services.phpfpm.pools.iridologie = { | 21 | services.phpfpm.pools.iridologie = { |
22 | listen = iridologie.phpFpm.socket; | 22 | user = config.services.httpd.Prod.user; |
23 | extraConfig = iridologie.phpFpm.pool; | 23 | group = config.services.httpd.Prod.group; |
24 | settings = iridologie.phpFpm.pool; | ||
24 | phpOptions = config.services.phpfpm.phpOptions + '' | 25 | phpOptions = config.services.phpfpm.phpOptions + '' |
25 | extension=${pkgs.php}/lib/php/extensions/mysqli.so | 26 | extension=${pkgs.php}/lib/php/extensions/mysqli.so |
26 | ''; | 27 | ''; |
@@ -39,7 +40,7 @@ in { | |||
39 | RewriteCond "%{HTTP_HOST}" "!^iridologie\.icommandeur\.org$" [NC] | 40 | RewriteCond "%{HTTP_HOST}" "!^iridologie\.icommandeur\.org$" [NC] |
40 | RewriteRule ^(.+)$ https://iridologie.icommandeur.org$1 [R=302,L] | 41 | RewriteRule ^(.+)$ https://iridologie.icommandeur.org$1 [R=302,L] |
41 | '' | 42 | '' |
42 | iridologie.apache.vhostConf | 43 | (iridologie.apache.vhostConf config.services.phpfpm.pools.iridologie.socket) |
43 | ]; | 44 | ]; |
44 | }; | 45 | }; |
45 | services.websites.env.production.watchPaths = [ | 46 | services.websites.env.production.watchPaths = [ |
diff --git a/modules/private/websites/isabelle/spip_builder.nix b/modules/private/websites/isabelle/spip_builder.nix index 2ab5394..e1130d1 100644 --- a/modules/private/websites/isabelle/spip_builder.nix +++ b/modules/private/websites/isabelle/spip_builder.nix | |||
@@ -3,28 +3,25 @@ rec { | |||
3 | app = iridologie.override { inherit (config) environment; }; | 3 | app = iridologie.override { inherit (config) environment; }; |
4 | phpFpm = rec { | 4 | phpFpm = rec { |
5 | serviceDeps = [ "mysql.service" ]; | 5 | serviceDeps = [ "mysql.service" ]; |
6 | socket = "/var/run/phpfpm/iridologie-${app.environment}.sock"; | 6 | pool = { |
7 | pool = '' | 7 | "listen.owner" = "${apacheUser}"; |
8 | user = ${apacheUser} | 8 | "listen.group" = "${apacheGroup}"; |
9 | group = ${apacheGroup} | 9 | "php_admin_value[upload_max_filesize]" = "20M"; |
10 | listen.owner = ${apacheUser} | 10 | "php_admin_value[post_max_size]" = "20M"; |
11 | listen.group = ${apacheGroup} | 11 | #"php_admin_flag[log_errors]" = "on"; |
12 | php_admin_value[upload_max_filesize] = 20M | 12 | "php_admin_value[open_basedir]" = "${app.spipConfig}:${configDir}:${app}:${app.varDir}:/tmp"; |
13 | php_admin_value[post_max_size] = 20M | 13 | "php_admin_value[session.save_path]" = "${app.varDir}/phpSessions"; |
14 | ;php_admin_flag[log_errors] = on | 14 | } // (if app.environment == "dev" then { |
15 | php_admin_value[open_basedir] = "${app.spipConfig}:${configDir}:${app}:${app.varDir}:/tmp" | 15 | "pm" = "ondemand"; |
16 | php_admin_value[session.save_path] = "${app.varDir}/phpSessions" | 16 | "pm.max_children" = "5"; |
17 | ${if app.environment == "dev" then '' | 17 | "pm.process_idle_timeout" = "60"; |
18 | pm = ondemand | 18 | } else { |
19 | pm.max_children = 5 | 19 | "pm" = "dynamic"; |
20 | pm.process_idle_timeout = 60 | 20 | "pm.max_children" = "20"; |
21 | '' else '' | 21 | "pm.start_servers" = "2"; |
22 | pm = dynamic | 22 | "pm.min_spare_servers" = "1"; |
23 | pm.max_children = 20 | 23 | "pm.max_spare_servers" = "3"; |
24 | pm.start_servers = 2 | 24 | }); |
25 | pm.min_spare_servers = 1 | ||
26 | pm.max_spare_servers = 3 | ||
27 | ''}''; | ||
28 | }; | 25 | }; |
29 | keys = [{ | 26 | keys = [{ |
30 | dest = "webapps/${app.environment}-iridologie"; | 27 | dest = "webapps/${app.environment}-iridologie"; |
@@ -51,13 +48,13 @@ rec { | |||
51 | modules = [ "proxy_fcgi" ]; | 48 | modules = [ "proxy_fcgi" ]; |
52 | webappName = "iridologie_${app.environment}"; | 49 | webappName = "iridologie_${app.environment}"; |
53 | root = "/run/current-system/webapps/${webappName}"; | 50 | root = "/run/current-system/webapps/${webappName}"; |
54 | vhostConf = '' | 51 | vhostConf = socket: '' |
55 | Include /var/secrets/webapps/${app.environment}-iridologie | 52 | Include /var/secrets/webapps/${app.environment}-iridologie |
56 | 53 | ||
57 | RewriteEngine On | 54 | RewriteEngine On |
58 | 55 | ||
59 | <FilesMatch "\.php$"> | 56 | <FilesMatch "\.php$"> |
60 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" | 57 | SetHandler "proxy:unix:${socket}|fcgi://localhost" |
61 | </FilesMatch> | 58 | </FilesMatch> |
62 | 59 | ||
63 | <Directory ${root}> | 60 | <Directory ${root}> |