capistrano-forever 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +4 -0
- data/capistrano-forever.gemspec +15 -0
- data/lib/capistrano/forever.rb +1 -0
- data/lib/capistrano/tasks/forever.rake +51 -0
- data/lib/capistrano_forever.rb +5 -0
- metadata +64 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c902171b2de2e3318898fdf8c6d667064232dd58
|
4
|
+
data.tar.gz: aab607940415fe189d2f8fdcc4cc2c43e92834b2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b3833de104fd40c429389529b2bda96f00cc35c2b432b85a624d883bc5bf22422f771cd151e5fa5841dfecebbbefa7e763bd50a3ee6b071de9a8ec72de3a5084
|
7
|
+
data.tar.gz: 6243bc747bfc82732cffb8155d3adfa680829c88f78a6cb2b6f8a8f24fef12573092bd7dde44b7a76a974916d0d2ae0361c09fb2fabf41f3ddd542bcfde1e25d
|
data/README.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
Gem::Specification.new do |gem|
|
2
|
+
gem.name = "capistrano-forever"
|
3
|
+
gem.version = "0.0.1"
|
4
|
+
gem.authors = ["lamp"]
|
5
|
+
gem.email = ["matthew.gradidge@gmail.com"]
|
6
|
+
gem.description = %q{manage forever process through capistrano}
|
7
|
+
gem.summary = %q{When deploying nodejs apps with forever you can now automatically restart apps and view logs}
|
8
|
+
gem.homepage = "http://github.com/lamp/capistrano-forever"
|
9
|
+
gem.license = "WTFPL"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($/)
|
12
|
+
gem.require_paths = ["lib"]
|
13
|
+
|
14
|
+
gem.add_dependency 'capistrano', '>= 3.0'
|
15
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path("../tasks/forever.rake", __FILE__)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
namespace :forever do
|
2
|
+
desc "Start forever process"
|
3
|
+
task :start do
|
4
|
+
on roles(:app), in: :sequence, wait: 5 do
|
5
|
+
within release_path do
|
6
|
+
execute :forever, "start", "--uid #{fetch(:process_name)} #{current_path}/#{fetch(:entry_point)}"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Stop forever process"
|
12
|
+
task :stop do
|
13
|
+
on roles(:app), in: :sequence, wait: 5 do
|
14
|
+
within release_path do
|
15
|
+
execute :forever, "stop", fetch(:process_name)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "Restart forever process (issues a full stop and start)"
|
21
|
+
task :restart do
|
22
|
+
on roles(:app), in: :sequence, wait: 5 do
|
23
|
+
within release_path do
|
24
|
+
invoke "deploy:stop"
|
25
|
+
invoke "deploy:start"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
desc "Tail logs of your app"
|
31
|
+
task :logs do
|
32
|
+
on roles(:app) do
|
33
|
+
execute :forever, "logs", File.join(current_path, fetch(:entry_point))
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "Clean all server logs (NOTE: IF YOU ARE SHARING THIS SERVER WITH ANY OTHER FOREVER PROCESSES THEIR LOGS WILL BE CLEANED TOO)"
|
38
|
+
task :clean_logs do
|
39
|
+
on roles(:app) do
|
40
|
+
execute :forever, "cleanlogs"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
namespace :load do
|
46
|
+
task :defaults do
|
47
|
+
set :process_name, fetch(:app_name)
|
48
|
+
set :entry_point, "app.js"
|
49
|
+
set :command, "node"
|
50
|
+
end
|
51
|
+
end
|
metadata
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-forever
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- lamp
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
description: manage forever process through capistrano
|
28
|
+
email:
|
29
|
+
- matthew.gradidge@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- README.md
|
35
|
+
- capistrano-forever.gemspec
|
36
|
+
- lib/capistrano/forever.rb
|
37
|
+
- lib/capistrano/tasks/forever.rake
|
38
|
+
- lib/capistrano_forever.rb
|
39
|
+
homepage: http://github.com/lamp/capistrano-forever
|
40
|
+
licenses:
|
41
|
+
- WTFPL
|
42
|
+
metadata: {}
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubyforge_project:
|
59
|
+
rubygems_version: 2.0.14
|
60
|
+
signing_key:
|
61
|
+
specification_version: 4
|
62
|
+
summary: When deploying nodejs apps with forever you can now automatically restart
|
63
|
+
apps and view logs
|
64
|
+
test_files: []
|