We are af83. We develop web applications and most of them are deployed with capistrano. The capistrano-af83 gem let us share recipes and good practices between our projects. It's an Open-Source project, so feel free to use it or just look at it for inspiration!
Add it in the Gemfile
and run bundle update
:
group :development do
gem 'capistrano-af83'
end
Then run capify .
, use of one the
examples of
config/deploy.rb
files and follow the comments for configuration.
And finally test it on the dev environment:
cap dev deploy:setup
cap dev deploy:check
cap dev deploy
It's possible to deploy a topic branch with this command:
cap dev deploy -s branch=my_topic_branch
We use some capistrano extensions (capistrano-af83 depends on them):
- capistrano_colors: colorize your capistrano output for better overview
- capistrano-notification: notify the end of the deployment on IRC
- sushi: add a recipe that starts a SSH connection to remote server
- bundler: automatically run bundle install on the remote server with deployment-friendly options
+-----------+-------------+------------+----------------------------+
| Cap stage | Rails env | Git branch | Host |
+-----------+-------------+------------+----------------------------+
| N/A | development | master | localhost |
| N/A | test | master | localhost/jenkins |
| dev | dev | master | dev.{project}.af83.com |
| staging | staging | staging | staging.{project}.af83.com |
| preprod | preprod | preprod | rc.{project}.com |
| prod | production | production | {project}.com |
+-----------+-------------+------------+----------------------------+
Copyright (c) 2011 af83
Released under the MIT license