skip to Main Content

At the moment I currently have automatic Git deployments set up on a very basic NodeJS server in Plesk 17.5.

The issue is if I push a new commit, I need to login in to the Plesk dashboard manually and click ‘Restart Application’ otherwise the changes are not live.

I tried adding npm start as one of the post-commands on the Git deployment but this doesn’t seem to work.

Does anyone know how I can automatically restart my Node Application every time there is an automatic deployment from Git? It’s not very automated if I have to login and restart the application anyway…

2

Answers


  1. Try /etc/init.d/psa restart.

    I haven’t tested it.

    Source

    Relevant page in official docs

    Login or Signup to reply.
  2. You need to update the modification date of the file tmp/restart.txt.

    Example with touch tmp/restart.txt


    With Passenger, you can also execute a command for that: passenger-config restart-app /Users/phusion/testapp. But I don’t know if it’s works with Plesk


    Edit:

    Plesk use Phusion Passenger to handle Node.js applications.

    To use that commands you need to the repository setting and “Enable additional deploy actions” with “Actions”. Example: (PATH=/opt/plesk/node/v9.8.0/bin:$PATH; npm install && npm run build &> npm-install.log) && touch tmp/restart.txt

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search