+ in
+ "/run/wrappers/bin/sudo -u ${config.services.httpd.Prod.user} ${script}/bin/piedsjaloux-production-pre";
+ postStart = let
+ script = pkgs.writeScriptBin "piedsjaloux-production-post" ''
+ #! ${pkgs.stdenv.shell}
+
+ cd ${ftpRoot}
+ if [ -d php_old ]; then
+ rm -rf php_old
+ fi
+ '';
+ in
+ "/run/wrappers/bin/sudo -u ${config.services.httpd.Prod.user} ${script}/bin/piedsjaloux-production-post";
+ serviceConfig.TimeoutStartSec="infinity";
+ };
+ services.filesWatcher.phpfpm-piedsjaloux_production = {
+ restart = true;
+ paths = [ "${packagePath}/${branch}.tar.gz" ];
+ };
+
+ system.activationScripts.piedsjaloux_production = {
+ deps = ["users"];
+ text = ''
+ install -m 0700 -o ${config.services.httpd.Prod.user} -g ${config.services.httpd.Prod.group} -d ${ftpRoot}
+ '';
+ };
+
+ secrets.keys."websites/piedsjaloux/production" = {
+ user = config.services.httpd.Prod.user;
+ group = config.services.httpd.Prod.group;
+ permissions = "0400";
+ text = ''
+ # This file is auto-generated during the composer install
+ parameters:
+ database_host: ${secrets.mysql.host}
+ database_port: ${secrets.mysql.port}
+ database_name: ${secrets.mysql.database}
+ database_user: ${secrets.mysql.user}
+ database_password: ${secrets.mysql.password}
+ database_server_version: ${config.myServices.databases.mariadb.package.mysqlVersion}
+ mailer_transport: smtp
+ mailer_host: 127.0.0.1
+ mailer_user: null
+ mailer_password: null
+ secret: ${secrets.secret}
+ pdflatex: "${texlive}/bin/pdflatex"
+ leapt_im:
+ binary_path: ${pkgs.imagemagick}/bin
+ '';
+ };