Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
capistrano-opscomplete (1.2.0)
capistrano-opscomplete (1.3.0)
capistrano (>= 3.0, < 4.0.0)
rake

Expand Down Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
```

Expand Down
9 changes: 9 additions & 0 deletions lib/capistrano/opscomplete/supervisor.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/capistrano/opscomplete/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Capistrano
module Opscomplete
VERSION = '1.2.0'.freeze
VERSION = '1.3.0'.freeze
end
end
Loading