Giter VIP home page Giter VIP logo

egg-deploy's Introduction

egg-deploy

Install

yarn add egg-deploy --dev

Usage

  • create nginx.conf with upstream block, example:
upstream nginxconf {
}

server {
    listen 443;
    ssl on;
    ssl_certificate *.fullchain.cer;
    ssl_certificate_key *.key
    server_name vux.li;
    location / {
        proxy_pass http://nginxconf;
    }
}
  • edit package.json
{
  "scripts": {
    "deploy": "egg-deploy"
  }
}

then run

yarn deploy

Customize

create a config file: .deploy.yml, default setting list:

instances:
  - 
    port: 8001
    title: 8001 # 自定义标题,避免与同机上其他 eggjs 重名
  -
    port: 8002
    title: 8002
startCommand: service nginx start # nginx 启动命令,运行时若 nginx 未运行会尝试执行
reloadCommand: nginx -s reload # nginx reload 命令
nginxConfig: nginx.conf # nginx 配置地址,可以是绝对地址,如果放置于项目下,记得在 nginx 全局配置里 include
waitStopTime: 5000 # 停止前的等待时间

todo

  • add test

egg-deploy's People

Contributors

airyland avatar

Watchers

James Cloos avatar

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.