X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fconnexionswing%2Fproduction.nix;h=0b52af1771418e2816355808cf6f40b9e0a02acb;hb=5400b9b6f65451d41a9106fae6fc00f97d83f4ef;hp=1427c8ded77dfb2831ea3ab0c0c073c24f573f90;hpb=8164ed90c7fdd93fd035bce3dc1b3fc6bde9e30e;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/connexionswing/production.nix b/modules/private/websites/connexionswing/production.nix index 1427c8d..0b52af1 100644 --- a/modules/private/websites/connexionswing/production.nix +++ b/modules/private/websites/connexionswing/production.nix @@ -1,6 +1,6 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: let - secrets = myconfig.env.websites.connexionswing.production; + secrets = config.myEnv.websites.connexionswing.production; app = pkgs.webapps.connexionswing.override { environment = secrets.environment; }; cfg = config.myServices.websites.connexionswing.production; pcfg = config.services.phpApplication; @@ -8,6 +8,7 @@ in { options.myServices.websites.connexionswing.production.enable = lib.mkEnableOption "enable Connexionswing's website in production"; config = lib.mkIf cfg.enable { + services.duplyBackup.profiles.connexionswing_prod.rootDir = app.varDir; services.webstats.sites = [ { name = "connexionswing.com"; } ]; services.phpApplication.apps.connexionswing_prod = { websiteEnv = "production"; @@ -25,16 +26,16 @@ in { "./bin/console --env=${app.environment} cache:clear --no-warmup" ]; phpOpenbasedir = [ "/tmp" "/run/wrappers/bin/sendmail" ]; - phpPool = '' - php_admin_value[upload_max_filesize] = 20M - php_admin_value[post_max_size] = 20M - ;php_admin_flag[log_errors] = on - pm = dynamic - pm.max_children = 20 - pm.start_servers = 2 - pm.min_spare_servers = 1 - pm.max_spare_servers = 3 - ''; + phpPool = { + "php_admin_value[upload_max_filesize]" = "20M"; + "php_admin_value[post_max_size]" = "20M"; + #"php_admin_flag[log_errors]" = "on"; + "pm" = "dynamic"; + "pm.max_children" = "20"; + "pm.start_servers" = "2"; + "pm.min_spare_servers" = "1"; + "pm.max_spare_servers" = "3"; + }; phpWatchFiles = [ config.secrets.fullPaths."webapps/${app.environment}-connexionswing" ]; @@ -51,7 +52,7 @@ in { parameters: database_host: ${secrets.mysql.host} database_port: ${secrets.mysql.port} - database_name: ${secrets.mysql.name} + database_name: ${secrets.mysql.database} database_user: ${secrets.mysql.user} database_password: ${secrets.mysql.password} database_server_version: ${pkgs.mariadb.mysqlVersion}