Skip to content

Instantly share code, notes, and snippets.

@yamaaki
Created October 8, 2015 15:49
Show Gist options
  • Save yamaaki/0f0053f1c16b32161e2d to your computer and use it in GitHub Desktop.
Save yamaaki/0f0053f1c16b32161e2d to your computer and use it in GitHub Desktop.
Chef::Log.info('Running deploy/before_migrate.rb')
Chef::Log.info('Change TimeZone..')
execute 'Change TimeZone' do
command <<-EOH
cp /usr/share/zoneinfo/Japan /etc/localtime.jst
rm -f /etc/localtime
ln -s /etc/localtime.jst /etc/localtime
EOH
user 'root'
not_if { ::File.exists?('/etc/localtime.jst') }
end
Chef::Log.info('Precompile assets..')
execute 'rake assets:precompile' do
cwd release_path
command 'bundle exec rake assets:precompile'
environment 'RAILS_ENV' => 'production'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment