Skip to content

schankam/meteor-up-git-autodeploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meteor Up Git Autodeploy

meteor-up-git-autodeploy (muga) is a command line tool to automate your meteor application deployment using Meteor Up when a git webhook has been triggered (or any other service that can issue a POST http request).

Requirements

Meteor Up

Because we are using Meteor Up to deploy the application, we assume that you already installed it globally on your system and that you already setup your server environment by running mup setup.

Please note that you MUST place a mup.json file in the directory where you will run muga.

You can find more information about Meteor Up configuration in their documentation.

Git

You will need to have a git version superior to 1.8.5 to use muga. Also, we suppose you already added your server user SSH key to your git user account, in order to access to the repository without involving passwords.

You can find more information on how to do this on most git repository hosting services documentation: GitHub, Bitbucket & GitLab.

Installation

You can install it globally using npm:

npm install -g meteor-up-git-autodeploy

Usage

By default, only your git repository url is required to use muga:

muga git@github.com:schankam/meteor-up-git-autodeploy.git

You can now trigger the deployment of you app (as it is defined in your mup.json) by sending a POST request to your server:

curl -X POST http://<your-server-ip>/deploy

Available options

To see a list of all available options, just run muga without any argument or by typing muga --help.

Port number

By default, muga is listening on the port 80. You can change this behavior by using the -p <port> option.

Git branch

By default, muga assumes the master branch is what you want to deploy. You can specify the branch to deploy by using the -b <branch> option. Note that the branch is automatically prefixed with origin/, such that providing -b dev will checkout origin/dev.

Verbose

muga is a quiet tool, but if you want it to talk more, just use the -v option and it will output all the log on the standard output.

Token

By default, you service is accessible by anyone and you might want to restrict it a little bit more; you can do this by specifiying a request token: -t <your-token>.

You will then need to pass this token in the query string of your request:

curl -X POST http://<your-server-ip>/deploy?token=<your-token>

Slack integration

If you wish to have the log of your deployment in a specific Slack channel, you can do it by specifying a Slack incoming webhook with the -s <your-slack-hook-url> option.

Integration with GitHub, Bitbucket, or GitLab

You can now setup any git repository to call your deployment url on a specific event by managing webhooks on the different git repository hosting providers: GitHub, Bitbucket & GitLab.

About

A command line utility to automate meteor application deployment using Meteor Up and Git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published