Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Created May 24, 2012 20:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtimberman/2784164 to your computer and use it in GitHub Desktop.
Save jtimberman/2784164 to your computer and use it in GitHub Desktop.
application "redmine" do
path "/opt/redmine"
owner "nobody"
group "nogroup"
repository "git://github.com/redmine/redmine.git"
revision "2.0-stable"
packages ["build-essential",
"git",
"postgresql-server-dev-all",
"libgraphicsmagick++-dev",
"libmagick++-dev",
"libmagick-dev",
"libmagickwand-dev",
"libsqlite3-dev"]
rails do
gems ["bundler","passenger"]
database do
database "redmine"
username "redmine"
password "awesome_password"
end
database_master_role "redmine_database_master"
end
passenger_apache2 do
server_aliases ["redmine", "redmine.#{node['domain']}"]
end
end
@evandavey
Copy link

Ok thanks. I found some better docs on the callbacks under the Deploy resource http://wiki.opscode.com/display/chef/Deploy+Resource - this probably should be referenced in the Application cookbook. I'll probably use before_restart or similar.

The other thing I want to do is override the unicorn and runit templates (to implement the structure used by github https://github.com/blog/517-unicorn). Ideally, I could still use the unicorn block as normal. I'm kind of new to Chef but can I just place sv-unicorn-run.erb (for the application_ruby unicorn resource) and unicorn.rb.erb (for the unicorn cookbook) within redmine/templates/defaults or do the underlying templates need a "cookbook" parameter in which case they would need modifications?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment