Commit 798fe14
Changed files (3)
recipes
recipes/default.rb
@@ -5,6 +5,7 @@ else
end
package node['stronglifters']['packages']
+package "logrotate"
include_recipe "runit"
include_recipe "stronglifters::ruby"
recipes/nginx.rb
@@ -4,7 +4,6 @@ if redhat?
end
package "nginx"
-package "logrotate"
user "nginx"
configuration = node['stronglifters']['nginx']
recipes/rails.rb
@@ -2,22 +2,30 @@ include_recipe "stronglifters::user"
include_recipe "stronglifters::aws"
root_path = node["stronglifters"]["root_path"]
+shared_path = File.join(root_path, "shared")
template "/etc/logrotate.d/rails" do
source "rails_logrotate.erb"
mode "0644"
- variables({ shared_path: File.join(root_path, "shared") })
+ variables({ shared_path: shared_path })
end
-directory root_path do
+template "/home/#{node["stronglifters"]["username"]}/.profile" do
+ variables(env: node["stronglifters"]["env"])
+end
+
+directory "#{shared_path}/config" do
mode "0755"
owner node["stronglifters"]["username"]
group node["stronglifters"]["username"]
recursive true
end
-template "/home/#{node["stronglifters"]["username"]}/.profile" do
- variables(env: node["stronglifters"]["env"])
+file "#{shared_path}/config/database.yml" do
+ content <<-YAML
+production:
+ url: <%= ENV['DATABASE_URL'] %>
+YAML
end
gem "foreman"