- secrets.keys = chloe.keys;
- systemd.services.phpfpm-chloe_dev.after = lib.mkAfter chloe.phpFpm.serviceDeps;
- systemd.services.phpfpm-chloe_dev.wants = chloe.phpFpm.serviceDeps;
- services.phpfpm.pools.chloe_dev = {
- listen = chloe.phpFpm.socket;
- extraConfig = chloe.phpFpm.pool;
+ services.duplyBackup.profiles.chloe_integration.rootDir = app.varDir;
+ secrets.keys = [
+ {
+ dest = "websites/chloe/integration";
+ user = apacheUser;
+ group = apacheGroup;
+ permissions = "0400";
+ text = ''
+ SetEnv SPIP_CONFIG_DIR "${./config}"
+ SetEnv SPIP_VAR_DIR "${app.varDir}"
+ SetEnv SPIP_SITE "chloe-${app.environment}"
+ SetEnv SPIP_LDAP_BASE "dc=immae,dc=eu"
+ SetEnv SPIP_LDAP_HOST "ldaps://ldap.immae.eu"
+ SetEnv SPIP_LDAP_SEARCH_DN "${ccfg.ldap.dn}"
+ SetEnv SPIP_LDAP_SEARCH_PW "${ccfg.ldap.password}"
+ SetEnv SPIP_LDAP_SEARCH "${ccfg.ldap.filter}"
+ SetEnv SPIP_MYSQL_HOST "${ccfg.mysql.host}"
+ SetEnv SPIP_MYSQL_PORT "${ccfg.mysql.port}"
+ SetEnv SPIP_MYSQL_DB "${ccfg.mysql.database}"
+ SetEnv SPIP_MYSQL_USER "${ccfg.mysql.user}"
+ SetEnv SPIP_MYSQL_PASSWORD "${ccfg.mysql.password}"
+ '';
+ }
+ ];
+ systemd.services.phpfpm-chloe_integration.after = lib.mkAfter [ "mysql.service" ];
+ systemd.services.phpfpm-chloe_integration.wants = [ "mysql.service" ];
+ services.phpfpm.pools.chloe_integration = {
+ user = config.services.httpd.Inte.user;
+ group = config.services.httpd.Inte.group;
+ settings = {
+ "listen.owner" = apacheUser;
+ "listen.group" = apacheGroup;
+ "php_admin_value[upload_max_filesize]" = "20M";
+ "php_admin_value[post_max_size]" = "20M";
+ # "php_admin_flag[log_errors]" = "on";
+ "php_admin_value[open_basedir]" = "${app.spipConfig}:${./config}:${app}:${app.varDir}:/tmp";
+ "php_admin_value[session.save_path]" = "${app.varDir}/phpSessions";
+ "pm" = "ondemand";
+ "pm.max_children" = "5";
+ "pm.process_idle_timeout" = "60";
+ };