Advertisement
Guest User

Untitled

a guest
Jun 17th, 2015
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.55 KB | None | 0 0
  1. config.assets.digest = true
  2. config.serve_static_assets = true
  3.  
  4. Rails.application.config.assets.version = '1.0'
  5.  
  6. require 'capistrano/setup'
  7. require 'capistrano/deploy'
  8. require 'capistrano/bundler'
  9. require 'capistrano/rbenv'
  10. require 'capistrano/rails/assets'
  11. require 'capistrano/rails/migrations'
  12.  
  13. set :rbenv_type, :user
  14. set :rbenv_ruby, '2.2.2'
  15.  
  16. lock '3.4'
  17. set :application, 'myapp'
  18. set :repo_url, 'git@bitbucket.org:user/app.git'
  19. set :deploy_to, '/home/deploy/app'
  20.  
  21. set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'tmp/uploads', 'vendor/bundle', 'public/system')
  22. set :bundle_binstubs, nil
  23. set :keep_releases, 5
  24.  
  25. SSHKit.config.command_map[:rake] = 'bundle exec rake'
  26. SSHKit.config.command_map[:rails] = 'bundle exec rails'
  27.  
  28. namespace :deploy do
  29.  
  30. desc 'Restart application'
  31. task :restart do
  32. on roles(:app), in: :sequence, wait: 5 do
  33. within "#{release_path}" do
  34. execute :bundle, "exec thin restart -O -C /etc/thin/app.yml"
  35. end
  36. end
  37. end
  38.  
  39. after :publishing, :restart
  40.  
  41. Me$: bin/cap production deploy
  42.  
  43. ...
  44. DEBUG [ff4ce05c] Running /usr/bin/env if test ! -d /home/deploy/app/releases/20150618015809; then echo "Directory does not exist '/home/deploy/app/releases/20150618015809'" 1>&2; false; fi as deploy@domain.com
  45. DEBUG [ff4ce05c] Command: if test ! -d /home/deploy/app/releases/20150618015809; then echo "Directory does not exist '/home/deploy/app/releases/20150618015809'" 1>&2; false; fi
  46. DEBUG [ff4ce05c] Finished in 0.370 seconds with exit status 0 (successful).
  47. INFO [4ab0f9c7] Running ~/.rbenv/bin/rbenv exec bundle exec rake assets:precompile as deploy@domain.com
  48. DEBUG [4ab0f9c7] Command: cd /home/deploy/app/releases/20150618015809 && ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.2.2 RAILS_ENV=staging ~/.rbenv/bin/rbenv exec bundle exec rake assets:precompile )
  49. DEBUG [4ab0f9c7] I, [2015-06-18T01:58:31.892846 #16404] INFO -- : Writing /home/deploy/app/releases/20150618015809/public/assets/proximanova-bold-7c9c7de5d4c12790ac074e1c15637315.eot
  50. DEBUG [4ab0f9c7] I, [2015-06-18T01:58:31.894641 #16404] INFO -- : Writing /home/deploy/app/releases/20150618015809/public/assets/proximanova-bold-8252ebfc2dfe42e154d8e8bcedbfd2f6.svg
  51. DEBUG [4ab0f9c7] I, [2015-06-18T01:58:31.896158 #16404] INFO -- : Writing /home/deploy/app/releases/20150618015809/public/assets/proximanova-bold-cf546ab4766383966d7b70bd2749c011.ttf
  52. DEBUG [4ab0f9c7] I, [2015-06-18T01:58:31.897666 #16404] INFO -- : Writing /home/deploy/app/releases/20150618015809/public/assets/proximanova-bold-4bafadbafe1d7f0915ef05f107e97a25.woff
  53. DEBUG [4ab0f9c7] I, [2015-06-18T01:58:31.899064 #16404] INFO -- : Writing /home/deploy/app/releases/20150618015809/public/assets/proximanova-bold-3b37298fc9eb69093953f9885e889090.woff2
  54. ...
  55.  
  56. Me$: bin/cap production deploy
  57.  
  58. ...
  59. DEBUG [cbbe9a55] Running /usr/bin/env if test ! -d /home/deploy/app/releases/20150618020326; then echo "Directory does not exist '/home/deploy/app/releases/20150618020326'" 1>&2; false; fi as deploy@domain.com
  60. DEBUG [cbbe9a55] Command: if test ! -d /home/deploy/app/releases/20150618020326; then echo "Directory does not exist '/home/deploy/app/releases/20150618020326'" 1>&2; false; fi
  61. DEBUG [cbbe9a55] Finished in 0.369 seconds with exit status 0 (successful).
  62. INFO [6e1eeadf] Running ~/.rbenv/bin/rbenv exec bundle exec rake assets:precompile as deploy@domain.com
  63. DEBUG [6e1eeadf] Command: cd /home/deploy/app/releases/20150618020326 && ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.2.2 RAILS_ENV=staging ~/.rbenv/bin/rbenv exec bundle exec rake assets:precompile )
  64. DEBUG [6e1eeadf] I, [2015-06-18T02:03:48.365574 #16929] INFO -- : Writing /home/deploy/app/releases/20150618020326/public/assets/proximanova-bold-78ec1c34931362f5fc9d1c64477d075f.eot
  65. DEBUG [6e1eeadf] I, [2015-06-18T02:03:48.367236 #16929] INFO -- : Writing /home/deploy/app/releases/20150618020326/public/assets/proximanova-bold-6fadee20c88b51ed286db9687b131999.svg
  66. DEBUG [6e1eeadf] I, [2015-06-18T02:03:48.368709 #16929] INFO -- : Writing /home/deploy/app/releases/20150618020326/public/assets/proximanova-bold-dc42499d91c401ef2e3452caa1917adf.ttf
  67. DEBUG [6e1eeadf] I, [2015-06-18T02:03:48.370105 #16929] INFO -- : Writing /home/deploy/app/releases/20150618020326/public/assets/proximanova-bold-2d17c273eabf9ce851993897dd1fb300.woff
  68. DEBUG [6e1eeadf] I, [2015-06-18T02:03:48.371464 #16929] INFO -- : Writing /home/deploy/app/releases/20150618020326/public/assets/proximanova-bold-7562093954d44696b2df7ada1488e2da.woff2
  69. ...
  70.  
  71. RBENV_ROOT=~/.rbenv RBENV_VERSION=2.2.2 RAILS_ENV=production ~/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement