This gem adds some recipes for Capistrano.
Warning: It is not recommended to use this gem as is since you need your server to be configured in a very specific way. Extract what you need or fork it to make it compliant with your setup.
Add this line to your applicationns
gem 'halfday', require: false
Add those lines to your application’s
set :application, 'YOUR APPLICATION NAME' set :repository, 'YOUR GIT REPOSITORY' require 'halfday'
Defining your environments
You still need to define every environments in
# config/deploy/staging.rb role :app, 'HOSTNAME', primary: true role :web, 'HOSTNAME', primary: true role :db, 'HOSTNAME', primary: true set :default_tag, '0.2.4' # Branch or Tag
For now, all those recipes will be used on deployment if their Gem is included in your
You can manually skip a recipe by setting the
ignored_recipes config variable:
set :ignored_recipes, [:nginx]
On deployment, you’ll be ask to specify the
tag you want to deploy. If you hit
default_tag will be used. You can also enter
HEAD to use the branch you’re currently on.
$ cap staging deploy * 2013-06-20 14:02:53 executing `staging' * 2013-06-20 14:02:53 executing `deploy' * 2013-06-20 14:02:53 executing `deploy:update' ** transaction: start * 2013-06-20 14:02:53 executing `deploy:update_code' Tag or branch to deploy: [0.2.4]
Dotenv is included as well in those recipes, if included in your project, it will automatically symlink
/opt/app/current on deployment.
cap foreman:restart # Restart your app cap foreman:start # Start your app cap foreman:stop # Stop your app cap foreman:export # Export upstart script to /etc/init/
cap git:clean # Remove .git cap git:init_submodules # Initialize Git submodule
If you’re using RVM on your server, it’ll automatically use the Ruby version written in your
If your project includes Whenever, the crontab will be updated automatically in a callback.
cap yard:generate # Generate your doc and make it available # in http://.../doc
Add a more flexible way to manage which recipes should be applied.
- Add Rails generator for the Capfile.
- Remove dependancy from Rails.
- More recipes, always.
Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We're a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.
We also love open-source software and we try to give back to the community as much as we can.