mina

Lightweight deployer for node development, inspired by mina and minco

npm install mina
1 downloads in the last day
2 downloads in the last week
19 downloads in the last month

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.2

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
{
    // Server to deploy to
    "server": "user@host"
    // Deploy to this dir on server
    , "server_dir": "/path/to/dir/on/server"
    // Git repository, only support git right now
    , "repo": "git@github.com: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
npm loves you