capistrano - Recap Procfile with Passenger for Rails 4 App -
i trying use recap deploying rails 4 app capistrano. in docs, says:
the ruby recipe [...] includes foreman support, starting , restarting processes defined in procfile.
my app needs 2 processes restarted each deployment:
- passenger
- delayed job
i've added gem 'foreman'
gemfile, , attempt @ procfile is:
# procfile web: sudo service nginx restart worker: bin/delayed_job restart
but it's wrong since nothing gets restarted when deploying.
what correct procfile like?
alternatively, if wrong approach taking in first place, better approach ensure these processes restarted on each deploy?
i ended giving on foreman, , using following code instead.
(because had started delayed_job on server different user, , app user not have permission stop other users' processes, had first manually stop delayed_job on server.)
# in capfile namespace :passenger task :restart run "touch /home/intouchsys/app/tmp/restart.txt" end end namespace :delayed_job task :restart as_app "bin/delayed_job restart" end end after "deploy", "passenger:restart" after "deploy", "delayed_job:restart"
Comments
Post a Comment