TypeScript-Node-Starter icon indicating copy to clipboard operation
TypeScript-Node-Starter copied to clipboard

Added Dockerfile and docker-compose file

Open shamin opened this issue 6 years ago • 7 comments

For ease in setting up a development environment I have added docker to this repository. Now user doesn't have to install node or mongo in their machine and can easily spawn up the starter just by running docker-compose up --build

  • Added a dockerfile which can be used in development and production
  • Added docker-compose.yml for easily setting up starter along with mongo for development.
  • Added .dockerignore to ignore node_modules and npm log from docker

shamin avatar Oct 04 '18 19:10 shamin

CLA assistant check
All CLA requirements met.

msftclas avatar Oct 04 '18 19:10 msftclas

This is very helpful, since the changes are approved is there any way to get it merged into master?

loganhuskins avatar Mar 13 '19 03:03 loganhuskins

@bowdenk7 can we get this merged?

strefethen avatar Apr 05 '19 02:04 strefethen

@orta sorry for disturbing you, could you please merge this awesome PR?

yzevm avatar Aug 15 '19 09:08 yzevm

I left it open because I'm still undecided on whether it should go in personally. I mostly sit on the side of no.

It's rare to see people having docker containers inside their sample repos (e.g. it's not in CRA/Angular/Next/Gatsby/tsdx), and these files come with no documentation - just three extra files for someone who is learning node + TS to wonder what to do with. I get there's a set of people that would want a dockerfile, but it doesn't feel like something which we should add to this sample.

orta avatar Aug 15 '19 11:08 orta

I saw this sitting out here, and agree that sample projects do not typically have dockerfiles included, but I question why. Typically, because there are few dependencies to run a project that are not built into the language, or the framework itself (ie expect to need React for a React project). I almost bailed on half of this implementation because I don't use Mongo, and don't want to install it. For that reason, I certainly will be pulling in the Dockerfile, so thank you @shamin!

I also agree that docker build/run/compose documentation should be added for the basic setup.

streamsapps avatar Nov 22 '19 06:11 streamsapps

Instead of adding a bunch of magic to the toplevel, why not put it all in a subdirectory instead? It will complicate the docker build a little bit since the context directory is up a level, but it should be doable. A README file in that directory could then describe things properly instead, since a full description at the toplevel README is probably going to make people hesitate to accept it.

elibarzilay avatar Nov 24 '19 18:11 elibarzilay