aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/isabelle/aten_integration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/websites/isabelle/aten_integration.nix')
-rw-r--r--modules/private/websites/isabelle/aten_integration.nix19
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, ... }:
2let 2let
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;
11in { 7in {
@@ -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