From 0292b2f1f3a8cba3179467bba6c6af6bd0e97453 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 28 May 2023 18:03:34 +0200 Subject: 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 --- constants.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'constants.php') 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'); -- cgit v1.2.3