Skip to content
This repository has been archived by the owner on Apr 18, 2019. It is now read-only.

deploying the app

adam malantonio edited this page Nov 7, 2018 · 1 revision

For deployment, we use Capistrano to do the code copying/moving and PM2 to run the server as a daemon. Anything that depends on PM2 is limited strictly to the Capistrano world; you can deploy the app locally by running npm start. To set up an environment on a new server, you'll want to:

  • install NodeJS (we're using v8.11.1 in production)
  • install pm2 globally
    • npm install -g pm2
  • make sure your server (httpd/nginx) is configured to proxy to port 8081
  • update config/deploy/<environment>.rb appropriately.

To deploy, run cap <environment> deploy locally. This will:

  • deploy the code to /var/www/purefood/current
  • run npm install
  • transpile and pack the code (npm run build)
  • restart the server at the new version code.
Clone this wiki locally