diff options
| author | 2023-05-28 18:03:34 +0200 | |
|---|---|---|
| committer | 2023-05-28 18:03:34 +0200 | |
| commit | 0292b2f1f3a8cba3179467bba6c6af6bd0e97453 (patch) | |
| tree | 65f2b10459c6046bc74556298a90d93187e80f1e /constants.php | |
| parent | eeefbdf9c720790b83cc82fd981929bf4d699120 (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.php | 7 |
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'); |
