diff --git a/Dockerfile b/Dockerfile index 96374c2bb..6c2f5ef07 100755 --- a/Dockerfile +++ b/Dockerfile @@ -148,6 +148,7 @@ RUN chmod +x /usr/local/bin/doctor && \ chmod +x /usr/local/bin/schedule && \ chmod +x /usr/local/bin/ssl && \ 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-certificates && \ chmod +x /usr/local/bin/worker-deletes && \ diff --git a/app/cli.php b/app/cli.php index 9eede27a3..c887493bb 100644 --- a/app/cli.php +++ b/app/cli.php @@ -14,6 +14,7 @@ include 'tasks/install.php'; include 'tasks/migrate.php'; include 'tasks/sdks.php'; include 'tasks/ssl.php'; +include 'tasks/vars.php'; $cli ->task('version') diff --git a/app/tasks/vars.php b/app/tasks/vars.php new file mode 100644 index 000000000..ed4a32973 --- /dev/null +++ b/app/tasks/vars.php @@ -0,0 +1,18 @@ +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'], '')); + } + }); \ No newline at end of file diff --git a/bin/vars b/bin/vars new file mode 100755 index 000000000..19e3f1ebf --- /dev/null +++ b/bin/vars @@ -0,0 +1,3 @@ +#!/bin/sh + +php /usr/src/code/app/cli.php vars $@ \ No newline at end of file