after :publishing, :'start_cold'
desc 'Restart application'task :restart do on roles(:app), in: :sequence, wait: 5 do execute :touch, release_path.join('tmp/restart.txt') endendHi Roy,
In a typical deployment configuration, a Rails app is normally started by a Web server like Apache or Nginix.
If you have Apache running on the server, and you have configured it to serve a Rails app, then simply making a Web request will trigger mod_rack (aka Phusion Passenger) into spawning your Ruby app.
Phusion Passenger will also, under normal configuration, notice if the "restart.txt" file had been touched and do just what you would expect. That's why the boilerplate for restarting your app servers includes "touch tmp/restart.txt" - it's exactly what you want under this (quite common) configuration.
There are many other ways to run your app, but I don't want to overwhelm you with options if you're just getting started.
Good luck!
Hunter
--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/9c735bae-e3bd-407e-b032-9cf5c98145b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAB-gw9TvD68Xbwj9xsqAwCLsMGgruyim39CAWqSEjn18yqs2nA%40mail.gmail.com.