Commit f3e2c34
Changed files (2)
recipes
templates
default
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
+}