I second Hunter's observations, mod_rack (Passenger) is a decent starting
place for nginx and Apache. It's not the super-pro HA setup that some shops
are running for zero-downtime restarts and extreme performance, but it's
analogous to the Apache mod_php experience, of dropping files in the web
root and letting Apache (or, it's modules) deal with it.

Lee Hambley
--
http://lee.hambley.name/
+49 (0) 170 298 5667


On 15 March 2014 15:13, Rob Hunter <[email protected]> wrote:

> Hi 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
> On 15/03/2014 8:19 AM, "Roy Miller" <[email protected]> wrote:
>
>> I'm running Cap 3.1.0, Rails 4.0.3, Ruby 2.1.0 on a Vagrant Virtual Box
>> VM. My deploy is working fine, including the knife-solo provisioning of the
>> machine. Now I need to finish things up by starting my Rails app in the
>> deploy directory ... and I can't figure out how to do it. Google hasn't
>> been any help so far. Makes me think I'm missing something truly basic.
>>
>> I see this boilerplate in my deploy.rb:
>>
>> 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')
>>   end
>> end
>>
>> Is that all that should be necessary to restart my Rails app? If so, it's
>> not working. The server isn't running on the Vagrant box.
>>
>> That led me down the path of trying to grep the ps aux output and see if
>> there's a running ruby process, but I wonder if I'm making it way too hard.
>> The basic question is, how do I start my Rails app after a deploy? Very
>> soon after that, once I'm over that hump, I'll want to know how to restart
>> it after a subsequent deploy. So feel free to kill two birds with one stone
>> :)
>>
>> --
>> 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 [email protected].
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msgid/capistrano/9c735bae-e3bd-407e-b032-9cf5c98145b9%40googlegroups.com<https://groups.google.com/d/msgid/capistrano/9c735bae-e3bd-407e-b032-9cf5c98145b9%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> 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 [email protected].
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/CAB-gw9TvD68Xbwj9xsqAwCLsMGgruyim39CAWqSEjn18yqs2nA%40mail.gmail.com<https://groups.google.com/d/msgid/capistrano/CAB-gw9TvD68Xbwj9xsqAwCLsMGgruyim39CAWqSEjn18yqs2nA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/CAN_%2BVLXn%3DaepYd5Q-K4nYietOWWBdEY0qJQ0jwhSyx-uNitwkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to