Question Programmatically restart Node applications on Plesk

Hunter75

New Pleskian
We are using Plesk to host our production services.

Basically, when I deploy the application to Plesk using Git, I need to press Restart application within the Node page on Plesk GUI and that works well.

But in some cases I need to do that pragmatically, I need to automatically restart Node service. Does Plesk offer such functionality? Maybe, some kind of API that listens to calls or else within Linux shell itself.
 
Hello, @futureweb . There is no native way to restart the application through the command line. The workaround I can suggest is to try the following:

  1. Connect to the server via SSH

  2. Create the restart.txt file at the application's tmp folder:

    sudo -u jdoe -g psacln touch /var/www/vhosts/example.com/tmp/restart.txt

    * jdoe is to be replaced with the subscription's system user. Can be checked at (Domains > example.com > Web Hosting Access)

    Meanwhile, the path should be checked on your end as it depends on the application's location.
 
Back
Top