Learning/Notes on Deploying a NodeJS app on Heroku, Amazon-AWS and Docker

Note/Warning: Am not going to go deeper/step-by-step into the deployment process and I'm not going to go deeper into the Pros & Cons by comparing them against each other, as well. 
I just wanted to share my learnings/difficulties faced in the process of deploying my server app to Heroku, Amazon-AWS & Docker-Cloud.

Heroku:
This is very straight-forward where you have different options:

Deploying with Git:
Just like how you use Git to push code to your Git repo, you can push your Heroku app onto their server using the very similar commands. This is easiest/simplest way to deploy apps on Heroku.

GitHub Integration:
If your repo is hosted on GitHub, then this is like a piece of cake, you can simply automate your whole deployment process.

Dropbox Sync:
If you're not hosting your repo for any reason and just saving them into your Dropbox folder, then also you're covered with the Heroku's easiest Deployment process. You can simply connect your Heroku account to the source in your Dropbox folder and it will take care of the deployment for you.

And there are also several other options as well, but these are the very simplest ones that I found while creating quick prototypes during Hackathons and for other purposes.
Like Steve Jobs says: "It just works!"

But, there are several debates as to why most of the big-shot guys/companies don't prefer to use it, so probably this might not be the best solution when it comes to deploying your production apps that have the potentiality to take over the world.


Docker Cloud & AWS:
There are several great tuts on Youtube to guide you on how to deploy your Node/React JS app onto AWS and also there are some good ones to deploy on Docker.

Deploying on Docker:
Docker is basically a container that's OS independent, which means it runs on any given platform. So, presume that your app will work on any given platform.
Just like the Heroku's Git command lines, Docker also provides a similar CLI which is very straight-forward to push your Docker images to the Docker Cloud.
There is something called as 'Swarm mode', where the Docker cloud will take care of creating instances/clusters for your server, but for some reason it was not working for me(Maybe it had some issues, since I'm using it in its Beta mode), so I turned off the Swarm mode and connected my AWS account using ARN ID(that acts as the API key b/w Docker cloud & AWS) in the Service providers section of the portal and after starting up the EC2 Instance on AWS, the docker image was hosted on the cloud.

AWS:
After launching the AWS Instance, I was just so much puzzled on how & where to access my app hosted onto it.
In the EC2 Instances summary page, you will be presented with a Public DNS address, which looks something like this: "ec2-18-221-199-55.us-east-2.compute.amazonaws.com", this is where your hosted app can be accessed.


And, Amazon has this process of network filtering, so you basically have the option to filter out or restrict the request from a certain set of IP addresses or you've to add your IP address from which you're trying to access this URL to connect with your app.


Conclusion:
This post might look absurd with much lesser information here & there, but I still think that this will help someone who gets started up and just wanted to have a summary and the few tidbits on the difficulties I faced would certainly help someone person like me to get beyond it.

That's all I had to say. Hope you've got something out of it.
Thanks for your time!

Comments

SEO Hire Me said…
This comment has been removed by a blog administrator.

Popular posts from this blog

Free Hand Drawing on Google's Map View

Android from iOS Guy's Perspective

Free Hand Drawing on Maps with MapBox SDK