1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00

Added vars debugger

This commit is contained in:
Eldad Fux 2020-10-15 08:03:38 +03:00
parent fdf0f9a3ef
commit 56d4c84cd3
6 changed files with 26 additions and 2 deletions

View file

@ -37,4 +37,5 @@ install:
script: script:
- docker ps - docker ps
- docker-compose logs appwrite - docker-compose logs appwrite
- docker exec appwrite vars
- docker exec appwrite test - docker exec appwrite test

View file

@ -149,6 +149,7 @@ RUN chmod +x /usr/local/bin/doctor && \
chmod +x /usr/local/bin/schedule && \ chmod +x /usr/local/bin/schedule && \
chmod +x /usr/local/bin/ssl && \ chmod +x /usr/local/bin/ssl && \
chmod +x /usr/local/bin/test && \ chmod +x /usr/local/bin/test && \
chmod +x /usr/local/bin/vars && \
chmod +x /usr/local/bin/worker-audits && \ chmod +x /usr/local/bin/worker-audits && \
chmod +x /usr/local/bin/worker-certificates && \ chmod +x /usr/local/bin/worker-certificates && \
chmod +x /usr/local/bin/worker-deletes && \ chmod +x /usr/local/bin/worker-deletes && \

View file

@ -14,6 +14,7 @@ include 'tasks/install.php';
include 'tasks/migrate.php'; include 'tasks/migrate.php';
include 'tasks/sdks.php'; include 'tasks/sdks.php';
include 'tasks/ssl.php'; include 'tasks/ssl.php';
include 'tasks/vars.php';
$cli $cli
->task('version') ->task('version')

18
app/tasks/vars.php Normal file
View file

@ -0,0 +1,18 @@
<?php
global $cli;
use Utopia\App;
use Utopia\CLI\Console;
use Utopia\Config\Config;
$cli
->task('vars')
->desc('List all the server environment variables')
->action(function () {
$variables = Config::getParam('variables', []);
foreach ($variables as $key => $value) {
Console::log('- '.$value['name'].'='.App::getEnv($value['name'], ''));
}
});

3
bin/vars Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
php /usr/src/code/app/cli.php vars $@

View file

@ -17,8 +17,8 @@ fi
echo "Updating git repository $1 / $2" echo "Updating git repository $1 / $2"
git fetch origin # git fetch origin
git reset --hard origin/master # git reset --hard origin/master
if test $(find "./app/db/DBIP/dbip-country-lite-2020-01.mmdb" -mmin +259200) if test $(find "./app/db/DBIP/dbip-country-lite-2020-01.mmdb" -mmin +259200)
then then