do-git-setup-helper

0.0.11 • Public • Published

Digital Ocean Git Setup Helper

I really publishing my sites with git. To do that, I like to have consistent folder structures and a consistent post-receive hook to handle starting and stopping the application.

All stopping / starting is handled with pm2. I've also used forever.js, but found this to be more reliable.

Project Directory

/var/www/{projectName}

Project Git Repo

/var/repo/{projectName}

Setup

First, create your setup directory and install the module.

mkdir /var/setup && cd /var/setup
npm install do-git-setup-helper

Then you'll need to create your index.js file to run this:

/* /var/setup/index.js */
require('do-git-setup-helper')(__dirname);

To run the helper, you'll execute this command:

node /var/setup/index.js

I hope that helps. Good Luck!

/do-git-setup-helper/

    Package Sidebar

    Install

    npm i do-git-setup-helper

    Weekly Downloads

    12

    Version

    0.0.11

    License

    ISC

    Last publish

    Collaborators

    • ecoker