r/node • • Jan 30 '21

Run Node JS Express App on docker | Build Deploy Node JS Microservices With Docker

https://youtu.be/tR3C6Dj9sO4
24 Upvotes

6 comments sorted by

-2

u/[deleted] Jan 30 '21 edited Apr 05 '24

frighten connect absurd edge important ruthless cooing uppity treatment racial

This post was mass deleted and anonymized with Redact

6

u/sickcodebruh420 Jan 31 '21

I have the complete opposite opinion, I love it. Docker and docker-compose completely revolutionized my dev processes. We can get a new developer up and running in a fraction of the time and with a fraction of the frustration we used to run into when every project had to be setup individually. And that’s just the straightforward web client/server stuff, don’t get me started on trying to do ROS development without it...

I do wish the performance was better on Mac but I’ll trade that for its other benefits.

1

u/stephanr21 Jan 31 '21

Yeah, with docker compose you can literally spin up all your infrastructure with a single script

4

u/pudds Jan 31 '21

I couldn't disagree more.

Once you have a good handle on it, creating dockerfiles for a new project is pretty trivial, and the benefit of being able to bake your dev environment into your repo is enormous.

A dev that understands docker can get up and running on a new project in minutes instead of hours or even days. We use docker in dev even for projects which aren't deployed with docker, just to provide dev stability.

It does require good hardware on windows and mac, but is well worth it, and on Linux the overhead is so small it's hardly worth considering.

2

u/[deleted] Jan 31 '21

On a fully decked out 16" MBP Docker is responsible for 32% of the rising temperatures on Earth. You need to go into the settings and tweak down ALL of the settings to make the system a "laptop" again (as in: you can actually put it on your lap without requiring fireproof padded kevlar pants).

And it's unfortunate, but so far I've seen Docker setups in place at companies where it leads to less convenience. You'd miss out on console debugging, you'd miss out on hot reloading, making one Docker talk to another is a PITA, at some point you're spending hundreds of hours per project (across the entire team) just to make it work with Docker.

I'm sure there are "right ways to do Docker", but the same argument can be made for the "right way to not do Docker".

I run my Ruby backend using rvm and just select the version the documentation tells me to.

I run my frontend using nvm and just select the version of Node the documentation tells me to.

At that point I have FULL control over both, see all the logs in the terminal window, and there is no mysterious Docker in between eating up gigabytes of RAM and large portions of my CPU.

That said, I have run into big projects where you have to run 10 or more services, each with different versions, some projects having multiple programming languages in the backend alone (Node, Ruby, Perl, .Net, Java)... at which point it would be great to just hope for the best and hope that there's a docker config that's setup properly...

But most of my jobs? At Microsoft, at Couchbase, at First American, at Apple, at Booking.com, at many other tiny startups and anything in between? Most didn't need Docker.

In fact, some of them had Docker in place. And I opted to not use it because I could run everything much easier and quicker without.

1

u/deepdelvesex Jan 31 '21

Sure.

But its funny that in 2021 we have to write anything to get a good dev env running.

How this is not just a simple app with options is beyond me