Skip to content

Instantly share code, notes, and snippets.

@ckdake
Created August 16, 2010 21:41
Show Gist options
  • Save ckdake/aef17730ef8514799dc1 to your computer and use it in GitHub Desktop.
Save ckdake/aef17730ef8514799dc1 to your computer and use it in GitHub Desktop.
install ithought rails app in passenger with Chef
include_recipe "rails"
include_recipe "passenger_apache2"
package "libsqlite3-dev"
gem_package "sqlite3-ruby"
%w{config log system pids}.each do |dir|
directory "/var/www/ithoughtorg/shared/#{dir}" do
action :create
recursive true
end
end
cookbook_file "/var/www/ithoughtorg/shared/config/database.yml" do
source "database.yml"
mode "0644"
end
deploy "/var/www/ithoughtorg" do
repo "git://github.com/ckdake/ithought.org.git"
environment "RAILS_ENV" => "production"
end
web_app "ithoughtorg" do
docroot "/var/www/ithoughtorg/current/public"
server_name "ithoughtorg.#{node[:domain]}"
server_aliases [ "ithoughtorg", node[:hostname] ]
rails_env "production"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment