Improve "Best Practices" regarding NODE_ENV
未关闭
还没有人认领这个 Issue。
docs
- 主要语言
- Dockerfile
- 星标
- 8.6k
- 派生
- 2k
- 平均合并
- 10 小时 19 分钟
- 30 天内合并 PR
- 16
描述
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 docs/BestPractices.md 中链接的部分开始,查看其中如何描述 Docker 构建期间和运行时的 NODE_ENV。更新指南以区分开发构建和生产运行,并说明 multi-stage 构建可以同时使用两者;文档应明确防止在构建期间省略 devDependencies。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- docker, node.js
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 1/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100