Merge pull request #505 from appwrite/feat--new-vars-command
Feat : New vars command
This commit is contained in:
commit
f959883712
4 changed files with 23 additions and 0 deletions
|
@ -148,6 +148,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 && \
|
||||||
|
|
|
@ -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
18
app/tasks/vars.php
Normal 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
Executable file
3
bin/vars
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
php /usr/src/code/app/cli.php vars $@
|
Loading…
Reference in a new issue