Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
application "redmine" do
path "/opt/redmine"
owner "nobody"
group "nogroup"
repository "git://"
revision "2.0-stable"
packages ["build-essential",
rails do
gems ["bundler","passenger"]
database do
database "redmine"
username "redmine"
password "awesome_password"
database_master_role "redmine_database_master"
passenger_apache2 do
server_aliases ["redmine", "redmine.#{node['domain']}"]

This comment has been minimized.

Copy link

@evandavey evandavey commented Jul 11, 2012

How would you then run redmine specific tasks eg: generate_secret_token - using a callback like before_restart? What about other things like installing themes or plugins (say from folders in files)?

Also, I'm trying to use unicorn with nginx via a socket instead - do you have any examples doing it that way?


This comment has been minimized.

Copy link
Owner Author

@jtimberman jtimberman commented Jul 12, 2012

Those kinds of things would likely be other resources in the recipe where this one is used, assuming they don't need to happen at the same time the code is deployed and set up (and they could trigger a restart of the web server, passenger / apache2 in this case).


This comment has been minimized.

Copy link

@evandavey evandavey commented Jul 13, 2012

Ok thanks. I found some better docs on the callbacks under the 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 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
You can’t perform that action at this time.