depot/third_party/nixpkgs/pkgs/servers/web-apps/wallabag/wallabag-data.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

26 lines
768 B
Diff

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)