aboutsummaryrefslogtreecommitdiff
path: root/constants.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-05-28 18:03:34 +0200
committerGravatar GitHub <noreply@github.com> 2023-05-28 18:03:34 +0200
commit0292b2f1f3a8cba3179467bba6c6af6bd0e97453 (patch)
tree65f2b10459c6046bc74556298a90d93187e80f1e /constants.php
parenteeefbdf9c720790b83cc82fd981929bf4d699120 (diff)
Improve Dev Container (#5423)
* Improve Dev Container PHPStan was failing in Dev Container * Update Docker to Alpine Linux 3.18 * New DATA_PATH environment variable * README
Diffstat (limited to 'constants.php')
-rw-r--r--constants.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/constants.php b/constants.php
index d2b76fb64..f2adc78db 100644
--- a/constants.php
+++ b/constants.php
@@ -40,7 +40,12 @@ defined('COPY_SYSLOG_TO_STDERR') or define('COPY_SYSLOG_TO_STDERR', filter_var(g
defined('MAX_LOG_SIZE') or define('MAX_LOG_SIZE', 1048576);
//This directory must be writable
-defined('DATA_PATH') or define('DATA_PATH', FRESHRSS_PATH . '/data');
+$dataPath = getenv('DATA_PATH');
+if (is_string($dataPath) && $dataPath !== '') {
+ define('DATA_PATH', $dataPath);
+} else {
+ defined('DATA_PATH') or define('DATA_PATH', FRESHRSS_PATH . '/data');
+}
defined('UPDATE_FILENAME') or define('UPDATE_FILENAME', DATA_PATH . '/update.php');
defined('USERS_PATH') or define('USERS_PATH', DATA_PATH . '/users');