foreman 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +3 -0
- data/export/upstart/master.conf.erb +2 -2
- data/export/upstart/process.conf.erb +1 -1
- data/lib/foreman.rb +1 -1
- data/lib/foreman/cli.rb +2 -0
- data/lib/foreman/export/inittab.rb +3 -1
- data/lib/foreman/export/upstart.rb +1 -0
- metadata +3 -3
data/README.markdown
CHANGED
@@ -43,6 +43,9 @@ The following options control how the application is run:
|
|
43
43
|
Use this name rather than the application's root directory name as the
|
44
44
|
name of the application when exporting.
|
45
45
|
|
46
|
+
* `-l`, `--log`:
|
47
|
+
Specify the directory to place process logs in.
|
48
|
+
|
46
49
|
* `-c`, `--concurrency`:
|
47
50
|
Specify the number of each process type to run. The value passed in
|
48
51
|
should be in the format `process=num,process=num`
|
@@ -3,4 +3,4 @@ stop on stopping <%= app %>-<%= process.name %>
|
|
3
3
|
respawn
|
4
4
|
|
5
5
|
chdir <%= engine.directory %>
|
6
|
-
exec su <%= user %> -c "<%= process.command %> >>
|
6
|
+
exec su <%= user %> -c "<%= process.command %> >> <%= log_root %>/<%=app%>/<%=process.name%>-<%=num%>.log 2>&1"
|
data/lib/foreman.rb
CHANGED
data/lib/foreman/cli.rb
CHANGED
@@ -26,6 +26,7 @@ class Foreman::CLI < Thor
|
|
26
26
|
desc "export FORMAT LOCATION", "Export the application to another process management format"
|
27
27
|
|
28
28
|
method_option :app, :type => :string, :aliases => "-a"
|
29
|
+
method_option :log, :type => :string, :aliases => "-l"
|
29
30
|
method_option :user, :type => :string, :aliases => "-u"
|
30
31
|
method_option :concurrency, :type => :string, :aliases => "-c",
|
31
32
|
:banner => '"alpha=5,bar=3"'
|
@@ -41,6 +42,7 @@ class Foreman::CLI < Thor
|
|
41
42
|
formatter.new(engine).export(location,
|
42
43
|
:name => options[:app],
|
43
44
|
:user => options[:user],
|
45
|
+
:log => options[:log],
|
44
46
|
:concurrency => options[:concurrency]
|
45
47
|
)
|
46
48
|
rescue Foreman::Export::Exception => ex
|
@@ -5,7 +5,9 @@ class Foreman::Export::Inittab < Foreman::Export::Base
|
|
5
5
|
def export(fname=nil, options={})
|
6
6
|
app = options[:app] || File.basename(engine.directory)
|
7
7
|
user = options[:user] || app
|
8
|
-
|
8
|
+
log_root = options[:log] || "/var/log"
|
9
|
+
|
10
|
+
log_dir = "#{log_root}/#{app}"
|
9
11
|
|
10
12
|
concurrency = parse_concurrency(options[:concurrency])
|
11
13
|
|
@@ -10,6 +10,7 @@ class Foreman::Export::Upstart < Foreman::Export::Base
|
|
10
10
|
|
11
11
|
app = options[:app] || File.basename(engine.directory)
|
12
12
|
user = options[:user] || app
|
13
|
+
log_root = options[:log] || "/var/log"
|
13
14
|
|
14
15
|
Dir["#{location}/#{app}*.conf"].each do |file|
|
15
16
|
say "cleaning up: #{file}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 6
|
10
|
+
version: 0.4.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Dollar
|