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.37k stars 323 forks source link

CLI: New subcommand for restarting applications #1279

Closed javorszky closed 3 months ago

javorszky commented 4 months ago

A new subcommand unitctl app restart <name> to restart the application.

Given the following unit config:

{
    "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/"
            }
        }
    }
}

<name> would either be hello-world or other-one. Everything else should return an error.

It would call this endpoint to restart the application in question: https://unit.nginx.org/configuration/#process-management

callahad commented 3 months ago

Resolved in #1323