Deploying application updates
with Passenger Enterprise in Standalone mode
In the previous step, you deployed an application to your production server for the first time. But what do you do when you have updated your app, and need to deploy updates? You will learn that on this page.
Table of contents
1 Transferring latest code
1.1 Login to the server as the application's user
Login to your server with SSH:
local-computer$ ssh email@example.com
myappuser with name of the application's OS user account.
1.2 Pull latest code from Git
Go to your application's code directory on the server, then use Git to pull the latest code:
$ cd /var/www/myapp/code $ git pull
2 Prepare application
2.1 Install app dependencies
Your application's npm dependencies may have changed, so we should install any updated npm dependencies while removing any now-extraneous dependencies. Run:
$ npm install --production $ npm prune --production
3 Restart application
Passenger may still be serving an old instance of your application. Now that all application updates have been prepared, tell Passenger to restart your application so that the updates take effect.
$ passenger-config restart-app $(pwd)