diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-22 20:10:54 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-23 01:44:51 +0200 |
commit | 41cce84a02652e22ad967c9f31669092eb3e7f0e (patch) | |
tree | b546e5a7524a00cd353b0d0e82e4dff038166dc1 /modules/private/websites/isabelle | |
parent | 750fe5a43b957b91a26069cf8a4fe19fc7b2633c (diff) | |
download | Nix-41cce84a02652e22ad967c9f31669092eb3e7f0e.tar.gz Nix-41cce84a02652e22ad967c9f31669092eb3e7f0e.tar.zst Nix-41cce84a02652e22ad967c9f31669092eb3e7f0e.zip |
Move devtools to other place
Diffstat (limited to 'modules/private/websites/isabelle')
-rw-r--r-- | modules/private/websites/isabelle/aten_integration.nix | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/modules/private/websites/isabelle/aten_integration.nix b/modules/private/websites/isabelle/aten_integration.nix index 7e0aaf7..288f20d 100644 --- a/modules/private/websites/isabelle/aten_integration.nix +++ b/modules/private/websites/isabelle/aten_integration.nix | |||
@@ -1,11 +1,7 @@ | |||
1 | { lib, pkgs, config, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | secrets = config.myEnv.websites.isabelle.aten_integration; | 3 | secrets = config.myEnv.websites.isabelle.aten_integration; |
4 | app = pkgs.callPackage ./aten_app { | 4 | webRoot = "/var/lib/ftp/immae/aten/public"; |
5 | composerEnv = pkgs.composerEnv.override { php = pkgs.php72; }; | ||
6 | environment = secrets.environment; | ||
7 | varDir = "/var/lib/isabelle_aten_integration"; | ||
8 | }; | ||
9 | cfg = config.myServices.websites.isabelle.aten_integration; | 5 | cfg = config.myServices.websites.isabelle.aten_integration; |
10 | pcfg = config.services.phpApplication; | 6 | pcfg = config.services.phpApplication; |
11 | in { | 7 | in { |
@@ -20,11 +16,12 @@ in { | |||
20 | httpdWatchFiles = [ | 16 | httpdWatchFiles = [ |
21 | config.secrets.fullPaths."websites/isabelle/aten_integration" | 17 | config.secrets.fullPaths."websites/isabelle/aten_integration" |
22 | ]; | 18 | ]; |
23 | inherit (app) webRoot varDir; | 19 | inherit webRoot; |
24 | inherit app; | 20 | varDir = "/var/lib/ftp/immae/aten_var"; |
21 | app = "/var/lib/ftp/immae/aten"; | ||
25 | serviceDeps = [ "postgresql.service" ]; | 22 | serviceDeps = [ "postgresql.service" ]; |
26 | preStartActions = [ | 23 | preStartActions = [ |
27 | "APP_ENV=${app.environment} ./bin/console --env=${app.environment} cache:clear --no-warmup" | 24 | "APP_ENV=dev ./bin/console --env=dev cache:clear --no-warmup" |
28 | ]; | 25 | ]; |
29 | phpOpenbasedir = [ "/tmp" ]; | 26 | phpOpenbasedir = [ "/tmp" ]; |
30 | phpPool = { | 27 | phpPool = { |
@@ -51,7 +48,7 @@ in { | |||
51 | # vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php#parseDatabaseUrlQuery | 48 | # vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php#parseDatabaseUrlQuery |
52 | psql_url = with secrets.postgresql; "pdo-pgsql://${user}:${password}@invalid:${port}/${database}?host=${socket}"; | 49 | psql_url = with secrets.postgresql; "pdo-pgsql://${user}:${password}@invalid:${port}/${database}?host=${socket}"; |
53 | in '' | 50 | in '' |
54 | SetEnv APP_ENV "${app.environment}" | 51 | SetEnv APP_ENV "dev" |
55 | SetEnv APP_SECRET "${secrets.secret}" | 52 | SetEnv APP_SECRET "${secrets.secret}" |
56 | SetEnv DATABASE_URL "${psql_url}" | 53 | SetEnv DATABASE_URL "${psql_url}" |
57 | ''; | 54 | ''; |
@@ -60,7 +57,7 @@ in { | |||
60 | certName = "integration"; | 57 | certName = "integration"; |
61 | addToCerts = true; | 58 | addToCerts = true; |
62 | hosts = [ "dev.aten.pro" ]; | 59 | hosts = [ "dev.aten.pro" ]; |
63 | root = app.webRoot; | 60 | root = webRoot; |
64 | extraConfig = [ | 61 | extraConfig = [ |
65 | '' | 62 | '' |
66 | <FilesMatch "\.php$"> | 63 | <FilesMatch "\.php$"> |
@@ -81,7 +78,7 @@ in { | |||
81 | ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://aten.pro\"></html>" | 78 | ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://aten.pro\"></html>" |
82 | </Location> | 79 | </Location> |
83 | 80 | ||
84 | <Directory ${app.webRoot}> | 81 | <Directory ${webRoot}> |
85 | Options Indexes FollowSymLinks MultiViews Includes | 82 | Options Indexes FollowSymLinks MultiViews Includes |
86 | AllowOverride All | 83 | AllowOverride All |
87 | Require all granted | 84 | Require all granted |