Commit f3e2c34

mo khan <mo@mokhan.ca>
2015-05-08 04:16:30
add a rails recipe to tie it all together.
1 parent c7ce946
Changed files (2)
recipes
templates
recipes/rails.rb
@@ -0,0 +1,25 @@
+include_recipe "mokhan-myface::rbenv"
+include_recipe "mokhan-myface::capistrano"
+include_recipe "mokhan-myface::nginx"
+include_recipe "mokhan-myface::unicorn"
+include_recipe "mokhan-myface::nodejs"
+
+[
+  'imagemagick',
+  'libmagickwand-dev',
+  'memcached',
+  'logrotate',
+  'sqlite3',
+].each do |item|
+  package item do
+    action :install
+  end
+end
+
+shared_path = "#{node['capistrano']['root_path']}/shared"
+
+template "/etc/logrotate.d/rails" do
+  source "rails_logrotate.erb"
+  mode "0644"
+  variables({ shared_path: shared_path })
+end
templates/default/rails_logrotate.erb
@@ -0,0 +1,10 @@
+<%= @shared_path %>/log/*.log {
+  daily
+  missingok
+  rotate 52
+  compress
+  delaycompress
+  notifempty
+  copytruncate
+  dateext
+}