aboutsummaryrefslogtreecommitdiff
path: root/pkgs/servers/web-apps/wallabag/wallabag-data.patch
blob: 086e93959800e3a4ec9620b4f45fcc3792d57704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/app/AppKernel.php b/app/AppKernel.php
index 40726f05..7d44e600 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -58,14 +58,19 @@ class AppKernel extends Kernel
         return $bundles;
     }
 
+    public function getProjectDir()
+    {
+        return getenv('WALLABAG_DATA') ?: dirname(__DIR__);
+    }
+
     public function getCacheDir()
     {
-        return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
+        return $this->getProjectDir() . '/var/cache/' . $this->getEnvironment();
     }
 
     public function getLogDir()
     {
-        return dirname(__DIR__) . '/var/logs';
+        return $this->getProjectDir() . '/var/logs';
     }
 
     public function registerContainerConfiguration(LoaderInterface $loader)