DEV Community

Cover image for How to host your Node app in a Docker Container on Heroku

How to host your Node app in a Docker Container on Heroku

Wachira on June 16, 2019

Introduction This is the third part of the series for Docker meets NodeJS. We got to add a mongo database as a service and maybe you a...
Collapse
 
wchr profile image
Wachira

Heroku is a platform that allows you to deploy your apps and not worry about the infrastructure thus giving you time to focus on writing awesome features for your app. If you use a VPS such as Linode, you will have to decide which OS to use, installing software or libraries so that your app can run successfully e.g. Nodejs, Git, Docker and so many more. Basically, with a VPS you will have to handle a lot and think about your infrastructure while you still have to build features for your app.

 
wchr profile image
Wachira

If you are a DevOps then Digital Ocean/or any VPS is best suited for you but for a dev who does not want to worry about infrastructure or setting up your Ubuntu server from scratch then, Heroku is your way to go.

 
misterhtmlcss profile image
Roger K.

Thank you so much for the answer. I'll definitely keep my mind open the next time around. This time I'm so focused at becoming more competent at Docker that I need to see it through as part of solidifying those skills. However you've convinced me to make an effort to learn more about Heroku's approach. Thank you for sharing and going that extra mile in sharing your thoughts. As a junior I survive off the kindness of our community.

 
bvmcode profile image
bvmcode

the cut of your jib matches your profile picture haha

 
wchr profile image
Wachira

I dont mind, infact i am happy that you asked that so that other devs might know the reason why😁

Thread Thread
 
misterhtmlcss profile image
Roger K. • Edited

Actually I'm doing this right now. I don't think the reasoning is as strong for Heroku, but I still find deployment is easier using a tool that you know will give you the end results you wanted.

Maybe I'm wrong; I'm new to Heroku and therefore that's what drew me to this article, but what I have found is still I need to set many things on Heroku to ensure I get the same outcome for my stack as I had on my machine. Is this not still the case? Perhaps using Docker is overkill when compared to this 'procfile', but I don't know what that is and so I'd rather avoid it personally. I am always seeking to reduce my technical burden when and where reasonable. I don't want to learn more about Heroku than I need to to use it effectively.

So I ask you guys. Is it not reasonable to just use Docker to deploy on Heroku and avoid learning these other platform specific methods?

Ps. Loved the banter!

 
misterhtmlcss profile image
Roger K. • Edited

Thank you for confirming my thoughts. Really appreciated! Have a great week. All the best you and your family :)

Collapse
 
wchr profile image
Wachira

Thanks...means a lot

Collapse
 
rafi_me91 profile image
Mohammad Rafi

waiting for the next part!!!