nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.25k stars 320 forks source link

CLI: New subcommand for listing applications #1280

Closed javorszky closed 1 week ago

javorszky commented 1 month ago

A new command unitctl app list or unitctl apps list (I propose both singular and plural would work here, but not with restarting the app).

Related to #1279.

Given the following unit json:

{
    "applications": {
        "hello-world": {
            "type": "php",
            "root": "/www/hw/public/",
            "script": "index.php",
            "environment": {
                "PHP_INI_SCAN_DIR": ":/tmp/php.inis/"
            }
        },
        "other-one": {
            "type": "php",
            "root": "/www/oo/public/",
            "script": "index.php",
            "environment": {
                "PHP_INI_SCAN_DIR": ":/tmp/php.inis/"
            }
        }
    }
}

The output of unitctl app list would be

hello-world
  type: php
  root: /www/hw/public
  script: index.php
  environment:
    PHP_INI_SCAN_DIR: /tmp/php.inis

other-one
  type: php
  root: /www/oo/public/
  script: index.php
  environment:
    PHP_INI_SCAN_DIR: /tmp/php.inis/
callahad commented 1 week ago

Resolved in #1323