]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Add devtools directory
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 18 Apr 2019 08:24:09 +0000 (10:24 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 18 Apr 2019 08:24:09 +0000 (10:24 +0200)
nixops/modules/websites/tools/tools/default.nix

index 2f34d27f48ed58396f3a94db5b73247d0c613e8c..d3092876169b03e9941c20b2d22721621907ed0d 100644 (file)
@@ -77,8 +77,18 @@ in {
     services.myWebsites.integration.vhostConfs.devtools = {
       certName    = "eldiron";
       hosts       = ["devtools.immae.eu" ];
-      root        = null;
+      root        = "/var/lib/ftp/devtools.immae.eu";
       extraConfig = [
+        ''
+          <Directory "/var/lib/ftp/devtools.immae.eu">
+            DirectoryIndex index.php index.htm index.html
+            AllowOverride all
+            Require all granted
+            <FilesMatch "\.php$">
+              SetHandler "proxy:unix:/var/run/phpfpm/devtools.sock|fcgi://localhost"
+            </FilesMatch>
+          </Directory>
+          ''
         rainloop.apache.vhostConf
       ];
     };
@@ -151,6 +161,11 @@ in {
     };
 
     services.myPhpfpm.poolPhpConfigs = {
+      devtools = ''
+        extension=${pkgs.phpPackages.redis}/lib/php/extensions/redis.so
+        extension=${pkgs.phpPackages.apcu}/lib/php/extensions/apcu.so
+        zend_extension=${pkgs.php}/lib/php/extensions/opcache.so
+        '';
       roundcubemail = roundcubemail.phpFpm.phpConfig;
     };
     services.myPhpfpm.poolConfigs = {
@@ -165,6 +180,20 @@ in {
       ldap = ldap.phpFpm.pool;
       rainloop = rainloop.phpFpm.pool;
       kanboard = kanboard.phpFpm.pool;
+      devtools = ''
+        listen = /var/run/phpfpm/devtools.sock
+        user = wwwrun
+        group = wwwrun
+        listen.owner = wwwrun
+        listen.group = wwwrun
+        pm = dynamic
+        pm.max_children = 60
+        pm.start_servers = 2
+        pm.min_spare_servers = 1
+        pm.max_spare_servers = 10
+
+        php_admin_value[open_basedir] = "/run/wrappers/bin/sendmail:/var/lib/ftp/devtools.immae.eu:/tmp"
+        '';
       tools = ''
         listen = /var/run/phpfpm/tools.sock
         user = wwwrun