From f38e33bf7897d97741d7e1e3f05ecab2e035db7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 19:37:16 +0000 Subject: [PATCH 1/3] Bump rack from 3.0.9.1 to 3.0.12 Bumps [rack](https://github.com/rack/rack) from 3.0.9.1 to 3.0.12. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v3.0.9.1...v3.0.12) --- updated-dependencies: - dependency-name: rack dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 661383e..5fc3f6c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -32,7 +32,7 @@ GEM parallel (1.20.1) parser (3.0.1.1) ast (~> 2.4.1) - rack (3.0.9.1) + rack (3.0.12) rainbow (3.0.0) rake (13.0.6) rubocop (0.76.0) From 7cc4fe617ba6e2a3bb106f231b7404cc24f765a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20V=C3=B6st?= Date: Fri, 14 Feb 2025 16:43:47 +0100 Subject: [PATCH 2/3] Add task to disable supervisor on non-procfile servers --- README.md | 5 ++++- lib/capistrano/opscomplete/supervisor.rake | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a38ab67..4638378 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,11 @@ And in case you enabled [`Procfile support`](https://makandracards.com/opscomple e.g. like this: ```ruby -# Update and Restart supervisor config +# Update supervisor config after 'deploy:updating', 'opscomplete:supervisor:gen_config' +# Stop processes and remove config on non :procfile_role servers +after 'deploy:published', 'opscomplete:supervisor:disable' +# Restart supervisor processes after 'deploy:published', 'opscomplete:supervisor:restart_procs' ``` diff --git a/lib/capistrano/opscomplete/supervisor.rake b/lib/capistrano/opscomplete/supervisor.rake index 7e8ae46..6731a2b 100644 --- a/lib/capistrano/opscomplete/supervisor.rake +++ b/lib/capistrano/opscomplete/supervisor.rake @@ -10,6 +10,15 @@ namespace :opscomplete do end end + desc 'Remove supervisor configuration and stop all Procfile processes on non :procfile_role servers.' + task :disable do + on roles(:all) - roles(fetch(:procfile_role, :app)) do + within release_path do + execute :supervisor_disable + end + end + end + desc 'Reread the supervisor configuration and (re)start all Procfile processes' task :restart_procs do on roles fetch(:procfile_role, :app) do From f1d98288b4bf222975b8e41f606875b387085e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20V=C3=B6st?= Date: Tue, 18 Feb 2025 11:36:55 +0100 Subject: [PATCH 3/3] release version 1.3.0 --- CHANGELOG.md | 4 ++++ Gemfile.lock | 2 +- lib/capistrano/opscomplete/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ff51e8..ec91826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.3.0] - 2025-02-18 +### Added +- Add new capistrano task (`opscomplete:supervisor:disable`) which disables supervisor on non-procfile servers + ## [1.2.0] - 2024-08-23 ### Changed - Added a feature to restart Puma diff --git a/Gemfile.lock b/Gemfile.lock index 5fc3f6c..ea0cbbd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - capistrano-opscomplete (1.2.0) + capistrano-opscomplete (1.3.0) capistrano (>= 3.0, < 4.0.0) rake diff --git a/lib/capistrano/opscomplete/version.rb b/lib/capistrano/opscomplete/version.rb index 6492dc0..603cdd9 100644 --- a/lib/capistrano/opscomplete/version.rb +++ b/lib/capistrano/opscomplete/version.rb @@ -1,5 +1,5 @@ module Capistrano module Opscomplete - VERSION = '1.2.0'.freeze + VERSION = '1.3.0'.freeze end end