基于Docker的Node.js开发环境---更新
发布于 7 年前 作者 huangyanxiong01 5803 次浏览 来自 分享

上次写的只是简单Node.js镜像和示例这次增加常用的开发软件并且加入Nodemon自动重启进程,只需要三步就可以拥有完整的开发环境,也可以自定义配置文件,下面看介绍

Docker-node.js

nodejsanddocker

Software Stack

  • MongoDB
  • Redis
  • MySQL
  • Node.js 7.x
  • Nginx

How to use it?

Requirements

Setup


git clone https://github.com/huangyanxiong01/docker-node.js.git

cd docker-node.js

yarn install

docker-compose up -d

Now,you can open http://127.0.0.1:3000/ in browser

Configure

You can find the custom $software configuration file in ./docker/$software/etc/

Data

You can find the $software data file in ./docker/$software/Data/

TODO

  • [ ] Build the nginx image with the lua module
  • [ ] Optimize the configuration file
  • [ ] Test on Windows
Why do I need a Lua module?

The nginx configuration file uses environment variables

Change Log

Changelog.md

欢迎提交PR,ISSUE

Node.js开发环境

4 回复

希望能介绍得详细些 是否一下载就可以获得一个完整的开发环境 怎么跟生产环境对接?

@nodejsnewbie 多谢你的意见,我会编写详细文档,以及生产环境的对接

赞,刚玩 docker 参考下你的配置

@rupertqin 欢迎一起完善这个项目😁😂,目标就是生产,开发都可以使用一套环境

回到顶部