Skip to content

Instantly share code, notes, and snippets.

@auser
Created April 15, 2009 02:24
Show Gist options
  • Save auser/95562 to your computer and use it in GitHub Desktop.
Save auser/95562 to your computer and use it in GitHub Desktop.
include_recipe "sqlite"
node[:rails][:version] = "2.3.2"
include_recipe "rails"
gem_package "rake" do
version "0.8.4"
end
execute "migrate-paparazzi" do
command "cd /var/www/paparazzi && RAILS_ENV=production rake db:migrate 2>/dev/null && touch tmp/restart.txt"
action :nothing
end
include_recipe "nginx"
template "#{node[:nginx_dir]}/sites-available/paparazzi" do
source "paparazzi.nginx.erb"
owner "root"
group "root"
mode 0644
notifies :run, resources(:execute => "migrate-paparazzi")
end
nginx_site "paparazzi"
server {
listen 80;
server_name paparazzi.com www.paparazzi.com;
access_log <%= @node[:nginx_log_dir] %>/paparazzi.access.log;
location / {
root /var/www/paparazzi/public;
index index.html index.htm;
}
}
pool :application do
instances 1..3
keypair "auser-work"
ami 'ami-7cfd1a15'
cloud :nginx do
has_directory "/var/www"
has_directory "/var/www/default"
disable :haproxy
has_git_repos "paparazzi" do
at "/var/www"
source "git://github.com/auser/paparazzi.git"
owner "www-data"
end
chef do
include_recipes "~/.poolparty/chef/cookbooks/*"
recipe "/Users/alerner/.poolparty/chef_recipe.rb"
templates "/Users/alerner/.poolparty/templates/"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment