Capistrano recipes for Redmine deployment. Setup is not fully automated, though I try to minimize manual steps.
Current Redmine version is 1.3.0.
-
This script tuned for multistaging deployment. Two stages defined: staging and production. Default stage is staging. You can change this in
config/deploy.rb#2. -
Redmine requires Ruby 1.8.7. I decided to use latest REE release. Install it on server using RVM. Also gemset named
redmineshould be created. You can change these settings inconfig/deploy.rb#15. Another requirement is using rubygems 1.6.2. This can be done by usingrvm rubygems 1.6.2in previously created gemset. -
Describe stages configuration. Use
config/deploy/stage.rb.exampleas example. Stage description should be placed toconfig/deploydirectory. -
Configuration files will be automatically uploaded and symlinked during deployment process. Three configuration files should be created. First describes database connection settings (
confing/database.yml), second - redmine configuration (config/configuration.yml), third - thin options (config/thin.yml). Add stage name extension to each file, sodatabase.ymlshould be nameddatabase.yml.productionfor production environment. -
bundle exec cap deploy:setup -
bundle exec cap deploy -
...
-
Profit!
-
New version of Redmine may require new verion of gems it depends on, so first step should be -
bundle exec cap setup:gems -
bundle exec cap deploy
Ask question, submit pull request, enjoy!
Dmitry Maksimov (dmtmax@gmail.com)