Improve "Best Practices" regarding NODE_ENV
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 8.6k
- Forks
- 2k
- Avg merge
- 10h 19m
- Merged PRs (30d)
- 16
Description
Problem
I just spent half a day trying to figure out, why trying to build an Angular project in Docker failed. I've followed the advice at Best Practices, not aware, that setting NODE_ENV to production causes npm not to install devDependencies.
Solution
The Best Practices guide should differentiate between using Node.js to build a Node.js based project (NODE_ENV=development) and to run a Node.js based project (NODE_ENV=production). Both can even be combined using multi-stage builds.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Best Practices guide at the linked section in docs/BestPractices.md and review how it describes NODE_ENV during Docker builds and runtime. Update the guidance to distinguish development builds from production runs and mention that multi-stage builds can use both; the documentation should clearly prevent devDependencies from being omitted during builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, node.js
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100