Reputation: 63
I am running a rails server on an Ubuntu EC2 instance and have run into an issue when it comes to deploying (and restarting) my server. The odd thing is; everything seems to work fine when I start a vanilla server (rails server
), but when I start the server as a daemon it does not reset (rails server -d
).
I use Capistrano to do deployment. As far as I can tell there is no issue; it pulls down my latest branch, runs migrations and does a touch tmp/restart.txt
. I had tried making my tmp/restart.txt
a shared file, but that does not seem to be the issue (although it is a configuration I think I'll keep). After discovering Capistrano is likely working as expected I tried sshing into the server and running touch tmp/restart.txt
myself. It works for the vanilla server but not the daemon.
Has anyone seen this issue before? If there is more info I could provide please let me know!
Env:
ruby 2.6.3p62
@/home/deploy/.rvm/rubies/ruby-2.6.3/bin/ruby
Rails 5.2.3
@/home/deploy/.rvm/gems/ruby-2.6.3/bin/rails
Bundler version 2.1.2
@/home/deploy/.rvm/gems/ruby-2.6.3/bin/bundle
Node v13.8.0
@/home/deploy/.nvm/versions/node/v13.8.0/bin/node
My logs, tmp, and config/master.key are shared as part of my Capistrano setup.
Upvotes: 0
Views: 402
Reputation: 2115
are you using puma or unicorn or passenger? apache or nginx? restarting the process depends more on that than anything.
personally, I like using Passenger with apache and when I restart apache, the passenger process restarts automatically.
Upvotes: 1