aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/piedsjaloux/integration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/websites/piedsjaloux/integration.nix')
-rw-r--r--modules/private/websites/piedsjaloux/integration.nix20
1 files changed, 8 insertions, 12 deletions
diff --git a/modules/private/websites/piedsjaloux/integration.nix b/modules/private/websites/piedsjaloux/integration.nix
index 437b127..64d577e 100644
--- a/modules/private/websites/piedsjaloux/integration.nix
+++ b/modules/private/websites/piedsjaloux/integration.nix
@@ -1,12 +1,7 @@
1{ lib, pkgs, config, ... }: 1{ lib, pkgs, config, ... }:
2let 2let
3 secrets = config.myEnv.websites.piedsjaloux.integration; 3 secrets = config.myEnv.websites.piedsjaloux.integration;
4 app = pkgs.callPackage ./app { 4 webRoot = "/var/lib/ftp/immae/piedsjaloux/web";
5 composerEnv = pkgs.composerEnv.override { php = pkgs.php72; };
6 environment = secrets.environment;
7 varDir = "/var/lib/piedsjaloux_integration";
8 secretsPath = config.secrets.fullPaths."websites/piedsjaloux/integration";
9 };
10 cfg = config.myServices.websites.piedsjaloux.integration; 5 cfg = config.myServices.websites.piedsjaloux.integration;
11 pcfg = config.services.phpApplication; 6 pcfg = config.services.phpApplication;
12 texlive = pkgs.texlive.combine { inherit (pkgs.texlive) attachfile preprint scheme-small; }; 7 texlive = pkgs.texlive.combine { inherit (pkgs.texlive) attachfile preprint scheme-small; };
@@ -19,14 +14,15 @@ in {
19 websiteEnv = "integration"; 14 websiteEnv = "integration";
20 httpdUser = config.services.httpd.Inte.user; 15 httpdUser = config.services.httpd.Inte.user;
21 httpdGroup = config.services.httpd.Inte.group; 16 httpdGroup = config.services.httpd.Inte.group;
22 inherit (app) webRoot varDir; 17 inherit webRoot;
18 varDir = "/var/lib/ftp/immae/piedsjaloux_var";
23 varDirPaths = { 19 varDirPaths = {
24 "tmp" = "0700"; 20 "tmp" = "0700";
25 }; 21 };
26 inherit app; 22 app = "/var/lib/ftp/immae/piedsjaloux";
27 serviceDeps = [ "mysql.service" ]; 23 serviceDeps = [ "mysql.service" ];
28 preStartActions = [ 24 preStartActions = [
29 "./bin/console --env=${app.environment} cache:clear --no-warmup" 25 "./bin/console --env=dev cache:clear --no-warmup"
30 ]; 26 ];
31 phpOpenbasedir = [ "/tmp" ]; 27 phpOpenbasedir = [ "/tmp" ];
32 phpPool = { 28 phpPool = {
@@ -47,7 +43,7 @@ in {
47 SYMFONY_DEBUG_MODE = "\"yes\""; 43 SYMFONY_DEBUG_MODE = "\"yes\"";
48 }; 44 };
49 phpWatchFiles = [ 45 phpWatchFiles = [
50 app.secretsPath 46 config.secrets.fullPaths."websites/piedsjaloux/integration"
51 ]; 47 ];
52 phpPackage = pkgs.php72; 48 phpPackage = pkgs.php72;
53 }; 49 };
@@ -80,7 +76,7 @@ in {
80 certName = "integration"; 76 certName = "integration";
81 addToCerts = true; 77 addToCerts = true;
82 hosts = [ "piedsjaloux.immae.eu" ]; 78 hosts = [ "piedsjaloux.immae.eu" ];
83 root = app.webRoot; 79 root = webRoot;
84 extraConfig = [ 80 extraConfig = [
85 '' 81 ''
86 <FilesMatch "\.php$"> 82 <FilesMatch "\.php$">
@@ -93,7 +89,7 @@ in {
93 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://piedsjaloux.fr\"></html>" 89 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://piedsjaloux.fr\"></html>"
94 </Location> 90 </Location>
95 91
96 <Directory ${app.webRoot}> 92 <Directory ${webRoot}>
97 Options Indexes FollowSymLinks MultiViews Includes 93 Options Indexes FollowSymLinks MultiViews Includes
98 AllowOverride None 94 AllowOverride None
99 Require all granted 95 Require all granted