- rails_port site_name do
- ruby node[:passenger][:ruby_version]
- directory rails_directory
- user "apis"
- group "apis"
- repository details[:repository]
- revision details[:revision]
- database_port node[:postgresql][:clusters][:"9.1/main"][:port]
- database_name database_name
- database_username "apis"
- run_migrations true
- end
-
- template "#{rails_directory}/config/initializers/setup.rb" do
- source "rails.setup.rb.erb"
- owner "apis"
- group "apis"
- mode 0644
- variables :site => site_name
- notifies :touch, "file[#{rails_directory}/tmp/restart.txt]"
- end