Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Added Dockerfile and docker-compose file #142

Open
wants to merge 140 commits into
base: master
Choose a base branch
from

Conversation

shamin
Copy link

@shamin shamin commented Oct 4, 2018

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

Bowden Kelly and others added 30 commits May 9, 2017 13:28
Update references from bowdenk7 repo to Microsoft repo
added package-lock for npm5 and fixed bug with flash messages
Added `build` `preLaunchTask` for debug configuration
Removed duplication in npm scripts `serve` and `watch`
…MaxOptions'.

fix err TypeScript-Node-Starter/src/controllers/api.ts[6, 9]: missing whitespace, 8 files
fix bugs of issue 15
fit  bugs of issue 15 and some other bugs caused by tslint
port changes from PR microsoft#11 and update package.lock from latest npm version
Meir017 and others added 19 commits March 21, 2018 10:34
use import instead of require in copyStaticAssets.ts
declare function signature only once
use same signature for model function & ts type
Fix Error: Unknown authentication strategy "local"
Remove duplicate entry in .gitignore
@msftclas
Copy link

msftclas commented Oct 4, 2018

CLA assistant check
All CLA requirements met.

@loganhuskins
Copy link

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

@strefethen
Copy link

@bowdenk7 can we get this merged?


COPY package*.json ./

RUN npm install
Copy link

@yzevm yzevm Aug 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably its better to use RUN npm ci command?
P.s. thanks for dockerize repo, so helpful

@yzevm
Copy link

yzevm commented Aug 15, 2019

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

@orta
Copy link
Contributor

orta commented Aug 15, 2019

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.

@streamsapps
Copy link

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.


WORKDIR /usr/src/app

COPY package*.json ./

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably LN9 will copy package*.json as well.

@elibarzilay
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.