-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Added Dockerfile and docker-compose file #142
base: master
Are you sure you want to change the base?
Conversation
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
fix: copying issues
use import instead of require in copyStaticAssets.ts
declare function signature only once
Update jQuery content version. Fixes microsoft#103
Add missing BS3 glyphicon fonts. Fixes microsoft#98
use same signature for model function & ts type
Add `watch-test` Script
Syntax highlighting
Fix Error: Unknown authentication strategy "local"
Remove duplicate entry in .gitignore
Fix typo in README.md
This is very helpful, since the changes are approved is there any way to get it merged into |
@bowdenk7 can we get this merged? |
|
||
COPY package*.json ./ | ||
|
||
RUN npm install |
There was a problem hiding this comment.
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
@orta sorry for disturbing you, could you please merge this awesome PR? |
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. |
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 ./ |
There was a problem hiding this comment.
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.
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. |
fbc1328
to
1e15e8b
Compare
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
dockerfile
which can be used in development and productiondocker-compose.yml
for easily setting up starter along with mongo for development..dockerignore
to ignore node_modules and npm log from docker