Setup

  1. Start a new machine.

  2. update it - sudo apt update

  3. Install nginx - sudo apt install nginx

  4. Config app reverse proxies - frontend, backend -

  5. Install node.js, npm using n (sometimes permission issue comes) - https://www.npmjs.com/package/n#installation

  6. npm install -g pm2, npm install -g serve

  7. Copy build folder from local to server .

  8. pm2 serve build/ 3000 --spa --name synthetic

  9. Install Jenkins for auto deployment

  10. Create 2 Jenkins applications - frontend, backend & link repos.

  11. Setup env variables on production.

  12. Provision Database on Mongodb Cloud.

  13. Setup DNS mapping to the newly created instance.

  14. Install certbot for https certificate.

Last updated