]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/tools/tools/yourls.nix
Move tools websites to stable web directories
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tools / tools / yourls.nix
index b97dac997ac2c207da301a3992248945f572a6d4..b12edfa3d5c44ea5fb913551e6006f14e304ecc2 100644 (file)
@@ -18,9 +18,9 @@ let
         define( 'YOURLS_DB_USER', '${env.mysql.user}' );
         define( 'YOURLS_DB_PASS', '${env.mysql.password}' );
         define( 'YOURLS_DB_NAME', '${env.mysql.database}' );
-        define( 'YOURLS_DB_HOST', 'db-1.immae.eu' );
+        define( 'YOURLS_DB_HOST', '${env.mysql.host}' );
         define( 'YOURLS_DB_PREFIX', 'yourls_' );
-        define( 'YOURLS_SITE', 'http://tools.immae.eu/url' );
+        define( 'YOURLS_SITE', 'https://tools.immae.eu/url' );
         define( 'YOURLS_HOURS_OFFSET', 0 ); 
         define( 'YOURLS_LANG', ''' ); 
         define( 'YOURLS_UNIQUE_URLS', true );
@@ -52,13 +52,15 @@ let
         )}
       '';
     });
-    apache = {
+    apache = rec {
       user = "wwwrun";
       group = "wwwrun";
       modules = [ "proxy_fcgi" ];
+      webappName = "tools_yourls";
+      root = "/run/current-system/webapps/${webappName}";
       vhostConf = ''
-        Alias /url "${webRoot}"
-        <Directory "${webRoot}">
+        Alias /url "${root}"
+        <Directory "${root}">
           <FilesMatch "\.php$">
             SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
           </FilesMatch>