Skip to content

kevin-coyle/node_git_deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Simple Node Git Deployer Build Status

A very simple node application that responds to a POST request to a given URL and then runs a git pull at a configurable directory.

This should be a cross platform tool and has been tested to work in both OS X and Linux (Ubuntu and CentOS).

Pre-requisites

  • NodeJS
  • Git
  • forever (if you want to deamonize the process)

Installation and Usage

  1. Copy the config.json.sample to config.json and edit the config file
    {
      "path": "/var/www",
      "secure_code": "ajsodiasdasjdiaosdja9349023jdsdjsddsd",
      "listen_port": 3080
    }

path

This is the path of your local git repository.

secure_code

This is the secure code that us going to be sent by your github webjook post request.

listen_port

This is the port that node will be listening to for your ghub post request.

  1. Run npm install

  2. Deploy and run the application on your server by running either:

    node index.js

    or

    node forever.js (to deamonize the process with forever)

    Make sure that the user that runs the node script has permissions to read/write in the deployment directory

  3. Set up your webhook to POST to:

    http:// your domain : listen_port / secure_code

Roadmap

  • Use nodegit library instead of shell commands
  • Add TravisCI
  • Add testing

About

Simple Git Deploy For Node

Resources

License

Stars

Watchers

Forks

Packages

No packages published