Giter Club home page Giter Club logo

mina's Introduction

Mina NPM version

NPM

A simple deploy tool inspired by mina, based on minco. This project is powered by node, forcus on quick and lightweight deployment and server automation over ssh for node projects.

Latest Version

v1.0.5

Installation

Make sure you have installed node.js including NPM

sudo npm install -g mina

Bash completion

Add this to your .bashrc, In this version only support bash

eval "$(mina completion=bash)"

Usage

# Create an example deploy.json
mina init

# Adjust it to your needs in deploy.json
{
    // Servers to deploy to
    "server": ["user@host1","user@host2"]
    // Port
    , "port": 13
    // Deploy to this dir on server
    , "server_dir": "/path/to/dir/on/server"
    // Git repository, only support git right now
    , "repo": "[email protected]:user/repo.git"
    // If you have more than one project in your git repo,
    // e.g. "projects/project_luna"
    , "prj_git_relative_dir": ""
    // Branch to be checkout and deploy
    , "branch": "master"
    // If remove git cloned directory then git clone again,
    // default is false
    , "force_regenerate_git_dir": false
    // Directories of your project in this array will use a
    // symbolic instead create every time when run deploy
    , "shared_dirs": ["node_modules", "db"]
    // How many release snapshots keep away from auto cleanup,
    // default is 10 if not presents
    , "history_releases_count": 10
    // Run customize scripts before run
    , "prerun": [
      "npm install",
      "npm test"
    ]
    // Start run your project
    , "run_cmd": "npm start"
}

# Deploy
mina deploy

# Or, indicate deploy config file
MINA_CONFIG=deploy_scripts/to_dev.json mina deploy

Keep in mind...

  • You have to ensure the username used for ssh have permission for operating directories
  • You have to ensure the remote server could execute git clone, that's means git-core must be installed, and, can clone the project from you git-repo.

Contributors

mina's People

Contributors

allanwind avatar bordenjardine avatar fanweixiao avatar houjiazong avatar marcus avatar nealma avatar

Watchers

 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.