miniploy

A minimal deployment tool using ruby, ssh and git.

Usage

Create a config/miniploy.rb file in your app:

app = 'myapp'
repository = 'repository-host.example:myapp'
target = '[email protected]'

Initial deployment:

miniploy setup

Deploying updates from repository:

miniploy update

Complete config sample

app = 'myapp'
repository = 'repository-host.example:myapp'
target = '[email protected]'
bundle_add = %w[unicorn]
ssh_args = '-A'

after_setup do
  append "#{app_path}/config/unicorn.rb", "    pid '$HOME/\#{pid_path}'\n    listen '$HOME/\#{run_path}/unicorn.sock'\n  eoh\nend\n\nstart do\n  bundle_run 'unicorn -c config/unicorn.rb -D'\nend\n\nstop do\n  run \"kill -QUIT `cat \#{pid_path}`\"\nend\n\nafter_update do\n  run \"kill -HUP `cat \#{pid_path}`\"\nend\n\n\ndef pid_path\n  \"\#{run_path}/unicorn.pid\"\nend\n".gsub(/^ +/, '')

Requirements

  • ruby
  • git
  • ssh client
  • rake (development)

Installation

You need ruby and rubygems, then install the miniploy gem:

gem install miniploy