diff options
Diffstat (limited to 'nixops/modules/websites/aten')
-rw-r--r-- | nixops/modules/websites/aten/aten.nix | 17 | ||||
-rw-r--r-- | nixops/modules/websites/aten/default.nix | 2 |
2 files changed, 14 insertions, 5 deletions
diff --git a/nixops/modules/websites/aten/aten.nix b/nixops/modules/websites/aten/aten.nix index d9286c3..897b3ba 100644 --- a/nixops/modules/websites/aten/aten.nix +++ b/nixops/modules/websites/aten/aten.nix | |||
@@ -29,6 +29,17 @@ let | |||
29 | pm.max_spare_servers = 3 | 29 | pm.max_spare_servers = 3 |
30 | ''}''; | 30 | ''}''; |
31 | }; | 31 | }; |
32 | keys."${environment}-aten" = { | ||
33 | destDir = "/run/keys/webapps"; | ||
34 | user = apache.user; | ||
35 | group = apache.group; | ||
36 | permissions = "0700"; | ||
37 | text = '' | ||
38 | SetEnv APP_ENV "${environment}" | ||
39 | SetEnv APP_SECRET "${config.secret}" | ||
40 | SetEnv DATABASE_URL "${config.psql_url}" | ||
41 | ''; | ||
42 | }; | ||
32 | apache = rec { | 43 | apache = rec { |
33 | user = "wwwrun"; | 44 | user = "wwwrun"; |
34 | group = "wwwrun"; | 45 | group = "wwwrun"; |
@@ -40,9 +51,7 @@ let | |||
40 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" | 51 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" |
41 | </FilesMatch> | 52 | </FilesMatch> |
42 | 53 | ||
43 | SetEnv APP_ENV "${environment}" | 54 | Include /run/keys/webapps/${environment}-aten |
44 | SetEnv APP_SECRET "${config.secret}" | ||
45 | SetEnv DATABASE_URL "${config.psql_url}" | ||
46 | 55 | ||
47 | ${if environment == "dev" then '' | 56 | ${if environment == "dev" then '' |
48 | <Location /> | 57 | <Location /> |
@@ -124,8 +133,6 @@ let | |||
124 | preInstall = '' | 133 | preInstall = '' |
125 | export SYMFONY_ENV="${environment}" | 134 | export SYMFONY_ENV="${environment}" |
126 | export APP_ENV="${environment}" | 135 | export APP_ENV="${environment}" |
127 | export DATABASE_URL="${config.psql_url}" | ||
128 | export APP_SECRET="${config.secret}" | ||
129 | ''; | 136 | ''; |
130 | postInstall = '' | 137 | postInstall = '' |
131 | ln -sf ${yarnModules}/node_modules . | 138 | ln -sf ${yarnModules}/node_modules . |
diff --git a/nixops/modules/websites/aten/default.nix b/nixops/modules/websites/aten/default.nix index 51a36fb..776a02e 100644 --- a/nixops/modules/websites/aten/default.nix +++ b/nixops/modules/websites/aten/default.nix | |||
@@ -25,6 +25,7 @@ in { | |||
25 | 25 | ||
26 | config = lib.mkMerge [ | 26 | config = lib.mkMerge [ |
27 | (lib.mkIf cfg.production.enable { | 27 | (lib.mkIf cfg.production.enable { |
28 | deployment.keys = aten_prod.keys; | ||
28 | services.myWebsites.commons.stats.enable = true; | 29 | services.myWebsites.commons.stats.enable = true; |
29 | services.myWebsites.commons.stats.sites = [ | 30 | services.myWebsites.commons.stats.sites = [ |
30 | { | 31 | { |
@@ -56,6 +57,7 @@ in { | |||
56 | }; | 57 | }; |
57 | }) | 58 | }) |
58 | (lib.mkIf cfg.integration.enable { | 59 | (lib.mkIf cfg.integration.enable { |
60 | deployment.keys = aten_dev.keys; | ||
59 | security.acme.certs."eldiron".extraDomains."dev.aten.pro" = null; | 61 | security.acme.certs."eldiron".extraDomains."dev.aten.pro" = null; |
60 | services.myPhpfpm.poolConfigs.aten_dev = aten_dev.phpFpm.pool; | 62 | services.myPhpfpm.poolConfigs.aten_dev = aten_dev.phpFpm.pool; |
61 | system.activationScripts.aten_dev = aten_dev.activationScript; | 63 | system.activationScripts.aten_dev = aten_dev.activationScript; |