{"id":13818278,"url":"https://github.com/capistrano/passenger","last_synced_at":"2025-04-13T04:59:21.560Z","repository":{"id":20157070,"uuid":"23427619","full_name":"capistrano/passenger","owner":"capistrano","description":"Passenger support for Capistrano 3.x","archived":false,"fork":false,"pushed_at":"2024-08-05T19:49:51.000Z","size":51,"stargazers_count":139,"open_issues_count":1,"forks_count":44,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-13T04:59:16.393Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capistrano.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-28T12:49:22.000Z","updated_at":"2025-01-04T10:03:15.000Z","dependencies_parsed_at":"2022-09-01T12:40:45.735Z","dependency_job_id":null,"html_url":"https://github.com/capistrano/passenger","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capistrano%2Fpassenger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capistrano%2Fpassenger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capistrano%2Fpassenger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capistrano%2Fpassenger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capistrano","download_url":"https://codeload.github.com/capistrano/passenger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665758,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T07:00:39.690Z","updated_at":"2025-04-13T04:59:21.540Z","avatar_url":"https://github.com/capistrano.png","language":"Ruby","funding_links":[],"categories":["Awesome Capistrano"],"sub_categories":["Gems"],"readme":"# Capistrano::Passenger\n\nAdds a task to restart your application after deployment via Capistrano. Supports Passenger versions 6 and lower.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n``` ruby\ngem 'capistrano-passenger'\n```\n\nAnd then execute:\n\n``` bash\n$ bundle\n```\n\nOr install it yourself as:\n\n``` bash\n$ gem install capistrano-passenger\n```\n\n## Usage\n\nAdd this line to your `Capfile` and `deploy:restart` will be setup to automatically run after `:publishing` is complete:\n\n``` ruby\nrequire 'capistrano/passenger'\n```\n\nYou can also run the underlying task in isolation:\n\n``` bash\n# Restart your Passenger application.\n# The restart mechanism used is based on the version of Passenger installed on your server.\n$ cap production passenger:restart\n# Alternatively:\n$ cap production deploy:restart\n```\n\nIf you want the task to run at a different point in your deployment, require `capistrano/passenger/no_hook` instead of `capistrano/passenger` and then add your own hook in `config/deploy.rb`.  When using this gem in this way, you must use `passenger:restart`--the `deploy:restart` alias is not available.  Example:\n\n``` ruby\n# Capfile\nrequire 'capistrano/passenger/no_hook'\n\n# config/deploy.rb\nafter :some_other_task, :'passenger:restart'\n```\n\nConfigurable options and their defaults:\n\n``` ruby\nset :passenger_roles, :app\nset :passenger_restart_runner, :sequence\nset :passenger_restart_wait, 5\nset :passenger_restart_limit, 2\nset :passenger_restart_with_sudo, false\nset :passenger_environment_variables, {}\nset :passenger_restart_command, 'passenger-config restart-app'\nset :passenger_restart_options, -\u003e { \"#{deploy_to} --ignore-app-not-running\" }\n```\n\n### Restarting Your Passenger Application\n\nIn most cases, the default settings should just work for most people. This plugin checks the version of passenger you're running on your server(s) and invokes the appropriate restart mechanism based on that.\n\n`passenger_restart_wait` and `passenger_restart_limit` are passed to the `on` block when restarting the application:\n\n``` ruby\non roles(fetch(:passenger_roles)), in: fetch(:passenger_restart_runner), wait: fetch(:passenger_restart_wait), limit: fetch(:passenger_restart_limit) do\n  with fetch(:passenger_environment_variables) do\n    # Version-specific restart happens here.\n  end\nend\n```\n\nNote that `passenger_restart_limit` has no effect if you are using the default `passenger_restart_runner` of `:sequence`.  sshkit only looks at it when the runner is `:groups`.\n\n`:passenger_environment_variables` is available if anything about your environment is not available to the user deploying your application. One use-case for this is when `passenger-config` isn't available in your user's `PATH` on the server. You could override it like so:\n\n``` ruby\nset :passenger_environment_variables, { :path =\u003e '/your/path/to/passenger/bin:$PATH' }\n```\n\n### Note for RVM users\n\nhttps://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#_when_the_system_has_multiple_ruby_interpreters descibes how \"Once installed, you can run Phusion Passenger’s Ruby parts under any Ruby interpreter you want, even if that Ruby interpreter was not the one you originally installed Phusion Passenger with. [...] There is however one caveat if you happen to be using RVM or RVM gemsets. When you gem install Phusion Passenger using RVM,\" it is available only to the Ruby version where it was installed.  Therefore, if you are using RVM **AND** passenger was installed via RVM **AND** it was installed under a different version of RVM than `fetch(:rvm_ruby_version)`, you need to `set :passenger_rvm_ruby_version` in your `config/deploy.rb`.\n\n### Note for rbenv users\n\nIf your `passenger` gem is installed on a different version of Ruby than your `:rbenv_ruby` Ruby, you can specify this with the following:\n\n```\nset :passenger_environment_variables, { rbenv_version: '3.0.1' }\n```\n\n### Note for Standalone Passenger users\n\nIf you are running passenger in standalone mode, it is possible for you to put passenger in your Gemfile and rely on capistrano-bundler to install it with the rest of your bundle.  If you are installing passenger during your deployment **AND** you are using the new restart method (see below), you need to set `:passenger_in_gemfile` to `true` in your `config/deploy.rb`.\n\n### Restarting Passenger \u003e= 4.0.33 Applications\n\nPassenger 4.0.33 introduced a new way to restart your application, and thus has some additional configuration options to accomodate for various server environments.\n\nIf you need to pass additional/different options to `:passenger_restart_command`, simply override `:passenger_restart_options`.\n\nIf you require `sudo` when restarting passenger, set `:passenger_restart_with_sudo` to `true`. **Note**: This option has no effect when restarting Passenger \u003c= 4.0.32 applications.\n\nTo opt out of the new way to restart, and use the deprecated approach instead, set `:passenger_restart_with_touch` to `true`.\n\n## Contributing\n\n1. Fork it ( https://github.com/capistrano/passenger/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapistrano%2Fpassenger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapistrano%2Fpassenger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapistrano%2Fpassenger/lists"}