Nesula
1.0.0
1.0.0
  • Introduction
  • Overview
    • First steps
    • Architecture
    • Authentication
    • Authorization
    • Routing
    • Meta
    • Mail
    • Security
      • Content Security Policy
    • Configuration
    • Service Worker
    • Logger
  • Development
    • Angular
    • NestJS
  • Nesula Devops
    • Nesula Setup
      • Files: Git
      • Database: Postgres
      • Server: Nginx
      • .Env & environment.ts
      • SSL
      • Build & Serve
    • Deployment
      • Deploy: Development
      • Deploy: Staging
      • Deploy: Production
    • Installation [ Old ]
  • Developer Setup
    • Visual Studio Code
      • Extensions
      • Run & Debug: Launch.json
      • Remote SSH
    • Chrome
    • Postman
  • Server Setup
    • Ubuntu Server Setup
      • Settings
      • Security
      • Users
    • App Server Setup
    • Node.js Hello World
    • Command Line
Powered by GitBook
On this page
  • Navigate to root app staging folder
  • Pull From Github
  • Angular
  • NestJS

Was this helpful?

  1. Nesula Devops
  2. Deployment

Deploy: Staging

Deploying changes to staging environment

Navigate to root app staging folder

$ cd /var/www/stage.nesula.com/nesula

Pull From Github

This will subject to your Git branch workflow

$ git checkout master   [ Assumes Staging code is on master branch ]
$ git pull      

Angular

$ cd /var/www/stage.nesula.com/nesula/angular-app
$ npm install           [ OPTIONAL: Install or update any new npm packages listed in package.json ]
$ npm run start:stage   [ Build angular javascript for dev environment ]

The start:dev command does the following:

  • Set the Angular .env file to staging

  • Run ng build to compile files in an angular default development mode

  • Start angular server by default on port 4200

NestJS

$ cd /var/www/stage.nesula.com/nesula/nest-api
$ npm install          [ OPTIONAL: Install or update any new npm packages lsited in package.json ]
$ npm run build        [ Delete / dist & build angular javascript ]
$ npm run start:stage  [ Starts NestJS node app with pm2 in prod mode ]

The NestJS NPM start:dev command does the following:

  1. Set NestJS .env file to development

  2. Delete the /dist folder

  3. Delete the log file

  4. Build application files in the /dist folder

  5. Copy handlebar email templates used by NestJS server pages to /dist folder

  6. Launch the app with node server

PreviousDeploy: DevelopmentNextDeploy: Production

Last updated 3 years ago

Was this helpful?