DEV Community

Cover image for Node.js app continuous deployment with AWS, PM2, and Github Actions.

Node.js app continuous deployment with AWS, PM2, and Github Actions.

Lukas Borawski on December 08, 2020

So you have this node.js app. It's not static, it's in Vue, React, Angular, whatever... It's ready and steady to publish and deploy. But where, how...
Collapse
 
fazi profile image
Muhammad Abdul Rehman

Hello Lukas
Where I need to add
eccosystem.json
and deployment scrpit
on my local machine or on my digitel ocean droplet?

Collapse
 
lukasborawski profile image
Lukas Borawski

Hi there. So you should put the ecosystem file in the root folder of your machine. A deployment script can be placed inside the app folder. You can see that inside of it the ecosystem file is copied and used as local. Cheers.

Collapse
 
fazi profile image
Muhammad Abdul Rehman

So i make the ecosystem file in my root foler anywhere or probably /etc folder

and the deployment script in the app folder and that app is on my digital ocean droplet

right?

Thread Thread
 
lukasborawski profile image
Lukas Borawski

No, not in the etc, in your Ubuntu user root folder. Typically it’s the place when you’re legged in on start.

Thread Thread
 
fazi profile image
Muhammad Abdul Rehman

Well sir i am doing it for the first time there are multiple things i dont understand I wish i could share my scree and ask you help to learn it

Thread Thread
 
fazi profile image
Muhammad Abdul Rehman

I am trying to comprehend it

Collapse
 
miachrist profile image
Mia Christ

Hey Lukas! this is definitely informative but honestly, I am not a fan big of Node.js deployment through AWS. These guys start charging your credit card whenever your resources increase or app expand. I found Heroku is better option here.

By the way, Heroku has turned itself into a paid platform and nowadays, I am considering this way to deploy my Node.js app. You can also give your comments on this method of app deployment.

Collapse
 
jitunayak profile image
Jitu Nayak

Very nice tutorial.

Collapse
 
faysal515 profile image
Faysal Ahmed

github.com/marketplace/actions/ssh...

The root Github Action says that it only supports Linux docker container, I was wondering if it can be used in plain ubuntu 16/18 instance

Collapse
 
lukasborawski profile image
Lukas Borawski

To be honest, I don't know. But supposed to ... I guess.

Collapse
 
fazi profile image
Muhammad Abdul Rehman

Sir are you on discord?