CNode

基于Docker的Node.js开发环境---更新

分享
Hhuangyanxiong01发布于10 年前最后回复10 年前4 回复6960 浏览0 收藏

上次写的只是简单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)

N
nodejsnewbie#1·10 年前

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

R
rupertqin#3·10 年前

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

H
huangyanxiong01#4·10 年前
引用 rupertqin赞,刚玩 docker 参考下你的配置

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

参与回复
登录后即可参与回复。登录