GithubHelp home page GithubHelp logo

Monitoring with god? about capistrano-puma HOT 4 CLOSED

seuros avatar seuros commented on September 27, 2024
Monitoring with god?

from capistrano-puma.

Comments (4)

Matt888 avatar Matt888 commented on September 27, 2024 1

I was able to get it working with God by using this for the config. Still testing it out to see if it'll work in all cases, but so far so good:

puma_pid = "#{rails_root}/tmp/pids/puma.pid"
puma_state = "#{rails_root}/tmp/pids/puma.state"

God.watch do |w|
  w.dir = "#{rails_root}"
  w.name = "puma"
  w.env = {"RAILS_ENV"=>rails_env}
  w.pid_file = "#{puma_pid}"
  w.start = "bundle exec puma -C #{rails_root}/config/puma.rb"
  w.stop = "bundle exec pumactl -S #{puma_state} stop"
  w.restart = "bundle exec pumactl -S #{puma_state} restart"
end

I also had to comment out require 'capistrano/puma' in the Capfile because I use god to restart the processes in deploy.rb:

namespace :deploy do
  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      within(current_path) do
        # Reload god and restart its processes
        execute :bundle, "exec god load config/app.god"
        execute :bundle, "exec god restart puma"
      end
    end
  end

from capistrano-puma.

seuros avatar seuros commented on September 27, 2024

There is a alpha support for monit if you want to keep your application up.
by adding : require 'capistrano/puma/monit' to the Capfile

I didn't know about that god gem. I will look into it and report back.

from capistrano-puma.

seuros avatar seuros commented on September 27, 2024

God is basically a 'monit like' written in ruby. If you want to write the tasks, i will merge them.

from capistrano-puma.

seuros avatar seuros commented on September 27, 2024

this gem don't restart puma automatically , so it should not interfere with your setting.

IMO you should not trust a ruby daemon watch over processes.

from capistrano-puma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.