X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/729d3365884c060a2cdb525e279529d28a9ce26e..91556e0a1247fa7877b55a95ba29016a715e0ce0:/cookbooks/dev/recipes/default.rb diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index 336fad65d..b5b864ffc 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -24,6 +24,7 @@ include_recipe "apache" include_recipe "passenger" include_recipe "git" include_recipe "mysql" +include_recipe "nodejs" include_recipe "postgresql" package "php-apc" @@ -53,6 +54,8 @@ package "python-magic" package "python-psycopg2" package "python-gdal" +nodejs_package "svgo" + easy_install_package "geojson" apache_module "env" @@ -61,6 +64,7 @@ apache_module "proxy" apache_module "proxy_fcgi" apache_module "rewrite" apache_module "wsgi" +apache_module "headers" gem_package "sqlite3" @@ -132,11 +136,19 @@ search(:accounts, "*:*").each do |account| 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" @@ -195,7 +207,7 @@ if node[:postgresql][:clusters][:"9.1/main"] recursive true end - file "/etc/cron.daily/rails-#{name}" do + file "/etc/cron.daily/rails-#{site_name.tr('.', '-')}" do action :delete end