Capobvious
capobvious is a recipes, which i use every day
Installation
Add this line to your application's Gemfile:
gem 'capobvious'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capobvious
Usage
If project don't have capistrano yet, you can run
capobvious .
Inside of you'r project, it create Capfile and config/deploy.rb (you need to configure it)
Or if you have exsisting project with capistrano and you want to use all recipes - just add to the end of Capfile
require 'capistrano/ext/capobvious'
Recipes
unicorn
require 'capobvious/recipes/unicorn'
cap unicorn:start
cap unicorn:stop
cap unicorn:restart
db
require 'capobvious/recipes/db'
cap db:create # Will create user and production database, taken from database.yml
cap db:seed # rake db:seed
cap db:migrate # rake db:migrate
cap db:pg_import # import remote server postgresql database to your development postgresql database
# IT WILL DELETE YOUR DEV DATABASE
rake
require 'capobvious/recipes/rake'
cap rake TASK='your:custom:task'
import
require 'capobvious/recipes/import'
cap import:sys # Import shared/system folder from server to you development machine
# (with rsync works much faster)
backup
require 'capobvious/recipes/backup'
cap backup:db # Backup postgresql server database to local project/tmp/backup folder
cap backup:sys # Backup shared/system folder to local project/tmp/backup folder
cap backup:all # Run backup:db backup:sys
bundle
require 'capobvious/recipes/bundle'
cap bundle:install # run automatically on deploy
log
require 'capobvious/recipes/log'
cap log:tail # stream production.log
logrotate
require 'capobvious/recipes/logrotate'
cap logrotate:init # uses logrotate to clean logs automaticly
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request