diff options
Diffstat (limited to 'modules/private/websites/connexionswing')
-rw-r--r-- | modules/private/websites/connexionswing/integration.nix | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/modules/private/websites/connexionswing/integration.nix b/modules/private/websites/connexionswing/integration.nix index 93cda00..fe0e4d9 100644 --- a/modules/private/websites/connexionswing/integration.nix +++ b/modules/private/websites/connexionswing/integration.nix | |||
@@ -1,12 +1,8 @@ | |||
1 | { lib, pkgs, config, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | secrets = config.myEnv.websites.connexionswing.integration; | 3 | secrets = config.myEnv.websites.connexionswing.integration; |
4 | app = pkgs.callPackage ./app { | 4 | webRoot = "/var/lib/ftp/immae/connexionswing/web"; |
5 | composerEnv = pkgs.composerEnv.override { php = pkgs.php72; }; | 5 | varDir = "/var/lib/ftp/immae/connexionswing_var"; |
6 | environment = secrets.environment; | ||
7 | varDir = "/var/lib/connexionswing_integration"; | ||
8 | secretsPath = config.secrets.fullPaths."websites/connexionswing/integration"; | ||
9 | }; | ||
10 | cfg = config.myServices.websites.connexionswing.integration; | 6 | cfg = config.myServices.websites.connexionswing.integration; |
11 | pcfg = config.services.phpApplication; | 7 | pcfg = config.services.phpApplication; |
12 | in { | 8 | in { |
@@ -18,16 +14,16 @@ in { | |||
18 | websiteEnv = "integration"; | 14 | websiteEnv = "integration"; |
19 | httpdUser = config.services.httpd.Inte.user; | 15 | httpdUser = config.services.httpd.Inte.user; |
20 | httpdGroup = config.services.httpd.Inte.group; | 16 | httpdGroup = config.services.httpd.Inte.group; |
21 | inherit (app) webRoot varDir; | 17 | inherit webRoot varDir; |
22 | varDirPaths = { | 18 | varDirPaths = { |
23 | "medias" = "0700"; | 19 | "medias" = "0700"; |
24 | "uploads" = "0700"; | 20 | "uploads" = "0700"; |
25 | "var" = "0700"; | 21 | "var" = "0700"; |
26 | }; | 22 | }; |
27 | inherit app; | 23 | app = "/var/lib/ftp/immae/connexionswing"; |
28 | serviceDeps = [ "mysql.service" ]; | 24 | serviceDeps = [ "mysql.service" ]; |
29 | preStartActions = [ | 25 | preStartActions = [ |
30 | "./bin/console --env=${app.environment} cache:clear --no-warmup" | 26 | "./bin/console --env=dev cache:clear --no-warmup" |
31 | ]; | 27 | ]; |
32 | phpOpenbasedir = [ "/tmp" "/run/wrappers/bin/sendmail" ]; | 28 | phpOpenbasedir = [ "/tmp" "/run/wrappers/bin/sendmail" ]; |
33 | phpPool = { | 29 | phpPool = { |
@@ -74,20 +70,20 @@ in { | |||
74 | certName = "integration"; | 70 | certName = "integration"; |
75 | addToCerts = true; | 71 | addToCerts = true; |
76 | hosts = ["connexionswing.immae.eu" "sandetludo.immae.eu" ]; | 72 | hosts = ["connexionswing.immae.eu" "sandetludo.immae.eu" ]; |
77 | root = app.webRoot; | 73 | root = webRoot; |
78 | extraConfig = [ | 74 | extraConfig = [ |
79 | '' | 75 | '' |
80 | <FilesMatch "\.php$"> | 76 | <FilesMatch "\.php$"> |
81 | SetHandler "proxy:unix:${pcfg.phpListenPaths.connexionswing_integration}|fcgi://localhost" | 77 | SetHandler "proxy:unix:${pcfg.phpListenPaths.connexionswing_integration}|fcgi://localhost" |
82 | </FilesMatch> | 78 | </FilesMatch> |
83 | 79 | ||
84 | <Directory ${app.varDir}/medias> | 80 | <Directory ${varDir}/medias> |
85 | Options FollowSymLinks | 81 | Options FollowSymLinks |
86 | AllowOverride None | 82 | AllowOverride None |
87 | Require all granted | 83 | Require all granted |
88 | </Directory> | 84 | </Directory> |
89 | 85 | ||
90 | <Directory ${app.varDir}/uploads> | 86 | <Directory ${varDir}/uploads> |
91 | Options FollowSymLinks | 87 | Options FollowSymLinks |
92 | AllowOverride None | 88 | AllowOverride None |
93 | Require all granted | 89 | Require all granted |
@@ -99,7 +95,7 @@ in { | |||
99 | ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://connexionswing.com\"></html>" | 95 | ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://connexionswing.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 |