diff options
Diffstat (limited to 'modules/private/websites/florian/app.nix')
-rw-r--r-- | modules/private/websites/florian/app.nix | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/modules/private/websites/florian/app.nix b/modules/private/websites/florian/app.nix index 5e6255c..27810a5 100644 --- a/modules/private/websites/florian/app.nix +++ b/modules/private/websites/florian/app.nix | |||
@@ -2,12 +2,7 @@ | |||
2 | let | 2 | let |
3 | adminer = pkgs.callPackage ../commons/adminer.nix { inherit config; }; | 3 | adminer = pkgs.callPackage ../commons/adminer.nix { inherit config; }; |
4 | secrets = config.myEnv.websites.tellesflorian.integration; | 4 | secrets = config.myEnv.websites.tellesflorian.integration; |
5 | app = pkgs.callPackage ./app { | 5 | webRoot = "/var/lib/ftp/immae/florian/web"; |
6 | composerEnv = pkgs.composerEnv.override { php = pkgs.php72; }; | ||
7 | environment = secrets.environment; | ||
8 | varDir = "/var/lib/florian_app"; | ||
9 | secretsPath = config.secrets.fullPaths."websites/florian/app"; | ||
10 | }; | ||
11 | cfg = config.myServices.websites.florian.app; | 6 | cfg = config.myServices.websites.florian.app; |
12 | pcfg = config.services.phpApplication; | 7 | pcfg = config.services.phpApplication; |
13 | in { | 8 | in { |
@@ -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/florian_var"; | ||
23 | varDirPaths = { | 19 | varDirPaths = { |
24 | "var" = "0700"; | 20 | "var" = "0700"; |
25 | }; | 21 | }; |
26 | inherit app; | 22 | app = "/var/lib/ftp/immae/florian"; |
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 = { |
@@ -81,7 +77,7 @@ in { | |||
81 | certName = "integration"; | 77 | certName = "integration"; |
82 | addToCerts = true; | 78 | addToCerts = true; |
83 | hosts = [ "app.tellesflorian.com" ]; | 79 | hosts = [ "app.tellesflorian.com" ]; |
84 | root = app.webRoot; | 80 | root = webRoot; |
85 | extraConfig = [ | 81 | extraConfig = [ |
86 | '' | 82 | '' |
87 | <FilesMatch "\.php$"> | 83 | <FilesMatch "\.php$"> |
@@ -99,7 +95,7 @@ in { | |||
99 | ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://tellesflorian.com\"></html>" | 95 | ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://tellesflorian.com\"></html>" |
100 | </Location> | 96 | </Location> |
101 | 97 | ||
102 | <Directory ${app.webRoot}> | 98 | <Directory ${webRoot}> |
103 | Options Indexes FollowSymLinks MultiViews Includes | 99 | Options Indexes FollowSymLinks MultiViews Includes |
104 | AllowOverride None | 100 | AllowOverride None |
105 | Require all granted | 101 | Require all granted |