include_recipe "passenger"
include_recipe "git"
include_recipe "mysql"
+include_recipe "nodejs"
include_recipe "postgresql"
package "php-apc"
package "python-psycopg2"
package "python-gdal"
+nodejs_package "svgo"
+
easy_install_package "geojson"
apache_module "env"
apache_module "proxy_fcgi"
apache_module "rewrite"
apache_module "wsgi"
+apache_module "headers"
gem_package "sqlite3"
directory "#{user_home}/public_html"
variables :user => name, :port => port
end
+
+ template "/etc/sudoers.d/#{name}" do
+ source "sudoers.user.erb"
+ owner "root"
+ group "root"
+ mode 0440
+ variables :user => name
+ end
end
-if node[:postgresql][:clusters][:"9.1/main"]
+if node[:postgresql][:clusters][:"9.3/main"]
postgresql_user "apis" do
cluster "9.3/main"
end
+ template "/usr/local/bin/cleanup-rails-assets" do
+ cookbook "web"
+ source "cleanup-assets.erb"
+ owner "root"
+ group "root"
+ mode 0755
+ end
+
node[:dev][:rails].each do |name, details|
database_name = details[:database] || "apis_#{name}"
site_name = "#{name}.apis.dev.openstreetmap.org"
recursive true
end
- file "/etc/cron.daily/rails-#{name}" do
+ file "/etc/cron.daily/rails-#{site_name.tr('.', '-')}" do
action :delete
end