chore: add missing env variable

This commit is contained in:
Christy Jacob 2023-09-01 17:08:51 -04:00
parent 3fd77bdda7
commit 31a7cca906
3 changed files with 4 additions and 2 deletions

3
.env
View file

@ -1,4 +1,5 @@
_APP_ENV=development
_APP_ENV=production
_APP_HOME=https://appwrite.io
_APP_LOCALE=en
_APP_WORKER_PER_CORE=6
_APP_CONSOLE_WHITELIST_ROOT=disabled

View file

@ -95,6 +95,7 @@ services:
- -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
environment:
- _APP_ENV
- _APP_HOME
- _APP_WORKER_PER_CORE
- _APP_LOCALE
- _APP_CONSOLE_WHITELIST_ROOT

View file

@ -245,7 +245,7 @@ class Doctor extends Action
try {
if (App::isProduction()) {
Console::log('');
$version = \json_decode(@\file_get_contents(App::getEnv('_APP_HOME', 'http://localhost') . '/v1/health/version'), true);
$version = \json_decode(@\file_get_contents(App::getEnv('_APP_HOME', 'http://localhost') . '/version'), true);
if ($version && isset($version['version'])) {
if (\version_compare($version['version'], App::getEnv('_APP_VERSION', 'UNKNOWN')) === 0) {