procman 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -0
- data/lib/proc_man/deploy.rb +31 -0
- data/lib/proc_man.rb +1 -1
- metadata +2 -2
- data/procman-1.0.0.gem +0 -0
data/README.md
CHANGED
@@ -60,3 +60,11 @@ the command using `bundle exec procman`.
|
|
60
60
|
* `procman stop` - stop your processes
|
61
61
|
* `procman restart` - restart your processes
|
62
62
|
|
63
|
+
## Executing on deployment
|
64
|
+
|
65
|
+
You can use the included Capistrano recipe to automatically run your procman start/stop/restart
|
66
|
+
commands whenever you deploy. Just require the deploy recipes in your `Capfile`.
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
require 'proc_man/deploy'
|
70
|
+
```
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This file includes the required options for starting/stopping/restarting
|
2
|
+
# on deployment using Capistrano.
|
3
|
+
|
4
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
5
|
+
namespace :procman do
|
6
|
+
task :start, :roles => :app do
|
7
|
+
run procman_command(:start)
|
8
|
+
end
|
9
|
+
|
10
|
+
task :stop, :roles => :app do
|
11
|
+
run procman_command(:stop)
|
12
|
+
end
|
13
|
+
|
14
|
+
task :restart, :roles => :app do
|
15
|
+
run procman_command(:restart)
|
16
|
+
end
|
17
|
+
|
18
|
+
after :start, "procman:start"
|
19
|
+
after :stop, "procman:stop"
|
20
|
+
after :restart, "procman:restart"
|
21
|
+
|
22
|
+
def procman_command(command)
|
23
|
+
command = "sh -c \"cd #{deploy_to} && bundle exec procman #{command} #{environment}\""
|
24
|
+
if user = fetch(:procman_user, 'app')
|
25
|
+
command = "sudo -u #{user} #{command}"
|
26
|
+
end
|
27
|
+
command
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
data/lib/proc_man.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: procman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -20,12 +20,12 @@ extensions: []
|
|
20
20
|
extra_rdoc_files: []
|
21
21
|
files:
|
22
22
|
- bin/procman
|
23
|
+
- lib/proc_man/deploy.rb
|
23
24
|
- lib/proc_man/process.rb
|
24
25
|
- lib/proc_man/procfile.rb
|
25
26
|
- lib/proc_man.rb
|
26
27
|
- LICENCE
|
27
28
|
- Procfile
|
28
|
-
- procman-1.0.0.gem
|
29
29
|
- procman.gemspec
|
30
30
|
- README.md
|
31
31
|
homepage: http://atechmedia.com
|
data/procman-1.0.0.gem
DELETED
Binary file
|