depot/third_party/nixpkgs/pkgs/servers/web-apps/wallabag/wallabag-data.patch
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

26 lines
770 B
Diff

diff --git a/app/AppKernel.php b/app/AppKernel.php
index 61b734e06..d25d1aaa3 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -62,14 +62,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)