Giter Site home page Giter Site logo

本地开发说明 about egg-cnode HOT 5 CLOSED

cnodejs avatar cnodejs commented on August 17, 2024
本地开发说明

from egg-cnode.

Comments (5)

thonatos avatar thonatos commented on August 17, 2024

dockerfile 以及 docker-compose 一键拉起类正式环境(#38

from egg-cnode.

thonatos avatar thonatos commented on August 17, 2024

@atian25 ,在这边讨论,Docker 支持:

正式环境

  • dockerfile 用于构建 egg-cnode 镜像(可以加到 docker hub 自动构建)
  • docker-compose.yml 启动一个基本和正式环境完全一致的服务(egg-cnode/redis/mongo)

开发环境

这边 docker 有两种用法:

  • docker-compose-dev.yml 只启动 redis/mongo 等数据库及相关服务
  • docker-compose-dev.yml 启动测试环境
    • docker 构建是分阶段的,package.json 变化才会重新装 node_modules
    • 仅 copy 代码消耗可以忽略不计了
    • 这样可以很好的解决 “代码在我这里可以跑,在其他人那边就不行了” 的问题

from egg-cnode.

atian25 avatar atian25 commented on August 17, 2024

我现在的需求很简单,要提供开发期支持,不然本地 egg-bin test 的时候,要自己启动 redis 和 mongo

部署这个暂时不关心

from egg-cnode.

thonatos avatar thonatos commented on August 17, 2024

好的,那我新建一个 compose file 用于启动 mongo/redis

from egg-cnode.

thonatos avatar thonatos commented on August 17, 2024

done.

from egg-cnode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.