Configurazione di PM2 su server Ubuntu 18+ per gestione applicazioni Rails, NodeJS, Python

Pubblicato da Gregorio Galante | ultima modifica Marzo 29, 2022

INSTALLARE NGINX, NODE E PM2

Per l’installazione di NGINX, NODE e PM2 si consiglia di fare riferimento alla guida https://play.zeranta.com/guide/configurazione-di-nginx-e-passenger-su-server-ubuntu-18/

CREARE UN FILE DI CONFIGURAZIONE

Creare un file di configurazione process.yml dove inserire le configurazioni dei vari progetti in esecuzione.

ESEMPIO CONFIGURAZIONE RAILS

apps:
  - name: nome_app
    cwd: ./path_app
    script: ./bin/startup.sh
    interpreter: bash
    env:
      RAILS_ENV: production
      PORT: 3001
      RAILS_SERVE_STATIC_FILES: 1