overman 0.0.1 → 0.87.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +52 -0
- data/bin/foreman-runner +41 -0
- data/bin/overman +7 -0
- data/data/example/Procfile +4 -0
- data/data/example/Procfile.without_colon +2 -0
- data/data/example/error +7 -0
- data/data/example/log/neverdie.log +4 -0
- data/data/example/spawnee +14 -0
- data/data/example/spawner +7 -0
- data/data/example/ticker +14 -0
- data/data/example/utf8 +11 -0
- data/data/export/bluepill/master.pill.erb +28 -0
- data/data/export/daemon/master.conf.erb +14 -0
- data/data/export/daemon/process.conf.erb +8 -0
- data/data/export/daemon/process_master.conf.erb +2 -0
- data/data/export/launchd/launchd.plist.erb +33 -0
- data/data/export/runit/log/run.erb +7 -0
- data/data/export/runit/run.erb +4 -0
- data/data/export/supervisord/app.conf.erb +31 -0
- data/data/export/systemd/master.target.erb +5 -0
- data/data/export/systemd/process.service.erb +21 -0
- data/data/export/upstart/master.conf.erb +2 -0
- data/data/export/upstart/process.conf.erb +15 -0
- data/data/export/upstart/process_master.conf.erb +2 -0
- data/lib/foreman/cli.rb +162 -0
- data/lib/foreman/distribution.rb +9 -0
- data/lib/foreman/engine/cli.rb +105 -0
- data/lib/foreman/engine.rb +494 -0
- data/lib/foreman/env.rb +29 -0
- data/lib/foreman/export/base.rb +171 -0
- data/lib/foreman/export/bluepill.rb +12 -0
- data/lib/foreman/export/daemon.rb +28 -0
- data/lib/foreman/export/inittab.rb +42 -0
- data/lib/foreman/export/launchd.rb +22 -0
- data/lib/foreman/export/runit.rb +34 -0
- data/lib/foreman/export/supervisord.rb +16 -0
- data/lib/foreman/export/systemd.rb +34 -0
- data/lib/foreman/export/upstart.rb +46 -0
- data/lib/foreman/export.rb +36 -0
- data/lib/foreman/helpers.rb +45 -0
- data/lib/foreman/process.rb +81 -0
- data/lib/foreman/procfile.rb +94 -0
- data/lib/foreman/vendor/thor/lib/thor/actions/create_file.rb +103 -0
- data/lib/foreman/vendor/thor/lib/thor/actions/create_link.rb +59 -0
- data/lib/foreman/vendor/thor/lib/thor/actions/directory.rb +118 -0
- data/lib/foreman/vendor/thor/lib/thor/actions/empty_directory.rb +135 -0
- data/lib/foreman/vendor/thor/lib/thor/actions/file_manipulation.rb +327 -0
- data/lib/foreman/vendor/thor/lib/thor/actions/inject_into_file.rb +103 -0
- data/lib/foreman/vendor/thor/lib/thor/actions.rb +318 -0
- data/lib/foreman/vendor/thor/lib/thor/base.rb +656 -0
- data/lib/foreman/vendor/thor/lib/thor/command.rb +133 -0
- data/lib/foreman/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +85 -0
- data/lib/foreman/vendor/thor/lib/thor/core_ext/io_binary_read.rb +12 -0
- data/lib/foreman/vendor/thor/lib/thor/core_ext/ordered_hash.rb +129 -0
- data/lib/foreman/vendor/thor/lib/thor/error.rb +32 -0
- data/lib/foreman/vendor/thor/lib/thor/group.rb +281 -0
- data/lib/foreman/vendor/thor/lib/thor/invocation.rb +177 -0
- data/lib/foreman/vendor/thor/lib/thor/line_editor/basic.rb +35 -0
- data/lib/foreman/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
- data/lib/foreman/vendor/thor/lib/thor/line_editor.rb +17 -0
- data/lib/foreman/vendor/thor/lib/thor/parser/argument.rb +70 -0
- data/lib/foreman/vendor/thor/lib/thor/parser/arguments.rb +175 -0
- data/lib/foreman/vendor/thor/lib/thor/parser/option.rb +146 -0
- data/lib/foreman/vendor/thor/lib/thor/parser/options.rb +220 -0
- data/lib/foreman/vendor/thor/lib/thor/parser.rb +4 -0
- data/lib/foreman/vendor/thor/lib/thor/rake_compat.rb +71 -0
- data/lib/foreman/vendor/thor/lib/thor/runner.rb +322 -0
- data/lib/foreman/vendor/thor/lib/thor/shell/basic.rb +436 -0
- data/lib/foreman/vendor/thor/lib/thor/shell/color.rb +149 -0
- data/lib/foreman/vendor/thor/lib/thor/shell/html.rb +126 -0
- data/lib/foreman/vendor/thor/lib/thor/shell.rb +81 -0
- data/lib/foreman/vendor/thor/lib/thor/util.rb +268 -0
- data/lib/foreman/vendor/thor/lib/thor/version.rb +3 -0
- data/lib/foreman/vendor/thor/lib/thor.rb +492 -0
- data/lib/foreman/version.rb +5 -0
- data/lib/foreman.rb +17 -0
- data/man/overman.1 +284 -0
- data/spec/foreman/cli_spec.rb +111 -0
- data/spec/foreman/engine_spec.rb +114 -0
- data/spec/foreman/export/base_spec.rb +19 -0
- data/spec/foreman/export/bluepill_spec.rb +37 -0
- data/spec/foreman/export/daemon_spec.rb +97 -0
- data/spec/foreman/export/inittab_spec.rb +40 -0
- data/spec/foreman/export/launchd_spec.rb +31 -0
- data/spec/foreman/export/runit_spec.rb +36 -0
- data/spec/foreman/export/supervisord_spec.rb +38 -0
- data/spec/foreman/export/systemd_spec.rb +155 -0
- data/spec/foreman/export/upstart_spec.rb +118 -0
- data/spec/foreman/export_spec.rb +24 -0
- data/spec/foreman/helpers_spec.rb +26 -0
- data/spec/foreman/process_spec.rb +71 -0
- data/spec/foreman/procfile_spec.rb +57 -0
- data/spec/foreman_spec.rb +16 -0
- data/spec/helper_spec.rb +19 -0
- data/spec/resources/Procfile +5 -0
- data/spec/resources/Procfile.bad +2 -0
- data/spec/resources/bin/echo +2 -0
- data/spec/resources/bin/env +2 -0
- data/spec/resources/bin/test +2 -0
- data/spec/resources/bin/utf8 +2 -0
- data/spec/resources/export/bluepill/app-concurrency.pill +49 -0
- data/spec/resources/export/bluepill/app.pill +81 -0
- data/spec/resources/export/daemon/app-alpha-1.conf +7 -0
- data/spec/resources/export/daemon/app-alpha-2.conf +7 -0
- data/spec/resources/export/daemon/app-alpha.conf +2 -0
- data/spec/resources/export/daemon/app-bravo-1.conf +7 -0
- data/spec/resources/export/daemon/app-bravo.conf +2 -0
- data/spec/resources/export/daemon/app.conf +14 -0
- data/spec/resources/export/inittab/inittab.concurrency +4 -0
- data/spec/resources/export/inittab/inittab.default +6 -0
- data/spec/resources/export/launchd/launchd-a.default +29 -0
- data/spec/resources/export/launchd/launchd-b.default +29 -0
- data/spec/resources/export/launchd/launchd-c.default +30 -0
- data/spec/resources/export/runit/app-alpha-1/log/run +7 -0
- data/spec/resources/export/runit/app-alpha-1/run +4 -0
- data/spec/resources/export/runit/app-alpha-2/log/run +7 -0
- data/spec/resources/export/runit/app-alpha-2/run +4 -0
- data/spec/resources/export/runit/app-bravo-1/log/run +7 -0
- data/spec/resources/export/runit/app-bravo-1/run +4 -0
- data/spec/resources/export/supervisord/app-alpha-1.conf +42 -0
- data/spec/resources/export/supervisord/app-alpha-2.conf +22 -0
- data/spec/resources/export/systemd/app-alpha.1.service +18 -0
- data/spec/resources/export/systemd/app-alpha.2.service +18 -0
- data/spec/resources/export/systemd/app-alpha.target +2 -0
- data/spec/resources/export/systemd/app-bravo.1.service +18 -0
- data/spec/resources/export/systemd/app-bravo.target +2 -0
- data/spec/resources/export/systemd/app.target +5 -0
- data/spec/resources/export/upstart/app-alpha-1.conf +11 -0
- data/spec/resources/export/upstart/app-alpha-2.conf +11 -0
- data/spec/resources/export/upstart/app-alpha.conf +2 -0
- data/spec/resources/export/upstart/app-bravo-1.conf +11 -0
- data/spec/resources/export/upstart/app-bravo.conf +2 -0
- data/spec/resources/export/upstart/app.conf +2 -0
- data/spec/spec_helper.rb +177 -0
- metadata +147 -16
- data/lib/overman/version.rb +0 -5
- data/lib/overman.rb +0 -1
@@ -0,0 +1,49 @@
|
|
1
|
+
Bluepill.application("app", :foreground => false, :log_file => "/var/log/bluepill.log") do |app|
|
2
|
+
|
3
|
+
app.uid = "app"
|
4
|
+
app.gid = "app"
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
app.process("alpha-1") do |process|
|
10
|
+
process.start_command = %Q{./alpha}
|
11
|
+
|
12
|
+
process.working_dir = "/tmp/app"
|
13
|
+
process.daemonize = true
|
14
|
+
process.environment = {"PORT"=>"5000"}
|
15
|
+
process.stop_signals = [:quit, 30.seconds, :term, 5.seconds, :kill]
|
16
|
+
process.stop_grace_time = 45.seconds
|
17
|
+
|
18
|
+
process.stdout = process.stderr = "/var/log/app/app-alpha-1.log"
|
19
|
+
|
20
|
+
process.monitor_children do |children|
|
21
|
+
children.stop_command "kill {{PID}}"
|
22
|
+
end
|
23
|
+
|
24
|
+
process.group = "app-alpha"
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
app.process("alpha-2") do |process|
|
29
|
+
process.start_command = %Q{./alpha}
|
30
|
+
|
31
|
+
process.working_dir = "/tmp/app"
|
32
|
+
process.daemonize = true
|
33
|
+
process.environment = {"PORT"=>"5001"}
|
34
|
+
process.stop_signals = [:quit, 30.seconds, :term, 5.seconds, :kill]
|
35
|
+
process.stop_grace_time = 45.seconds
|
36
|
+
|
37
|
+
process.stdout = process.stderr = "/var/log/app/app-alpha-2.log"
|
38
|
+
|
39
|
+
process.monitor_children do |children|
|
40
|
+
children.stop_command "kill {{PID}}"
|
41
|
+
end
|
42
|
+
|
43
|
+
process.group = "app-alpha"
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
Bluepill.application("app", :foreground => false, :log_file => "/var/log/bluepill.log") do |app|
|
2
|
+
|
3
|
+
app.uid = "app"
|
4
|
+
app.gid = "app"
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
app.process("alpha-1") do |process|
|
10
|
+
process.start_command = %Q{./alpha}
|
11
|
+
|
12
|
+
process.working_dir = "/tmp/app"
|
13
|
+
process.daemonize = true
|
14
|
+
process.environment = {"PORT"=>"5000"}
|
15
|
+
process.stop_signals = [:quit, 30.seconds, :term, 5.seconds, :kill]
|
16
|
+
process.stop_grace_time = 45.seconds
|
17
|
+
|
18
|
+
process.stdout = process.stderr = "/var/log/app/app-alpha-1.log"
|
19
|
+
|
20
|
+
process.monitor_children do |children|
|
21
|
+
children.stop_command "kill {{PID}}"
|
22
|
+
end
|
23
|
+
|
24
|
+
process.group = "app-alpha"
|
25
|
+
end
|
26
|
+
|
27
|
+
app.process("bravo-1") do |process|
|
28
|
+
process.start_command = %Q{./bravo}
|
29
|
+
|
30
|
+
process.working_dir = "/tmp/app"
|
31
|
+
process.daemonize = true
|
32
|
+
process.environment = {"PORT"=>"5100"}
|
33
|
+
process.stop_signals = [:quit, 30.seconds, :term, 5.seconds, :kill]
|
34
|
+
process.stop_grace_time = 45.seconds
|
35
|
+
|
36
|
+
process.stdout = process.stderr = "/var/log/app/app-bravo-1.log"
|
37
|
+
|
38
|
+
process.monitor_children do |children|
|
39
|
+
children.stop_command "kill {{PID}}"
|
40
|
+
end
|
41
|
+
|
42
|
+
process.group = "app-bravo"
|
43
|
+
end
|
44
|
+
|
45
|
+
app.process("foo_bar-1") do |process|
|
46
|
+
process.start_command = %Q{./foo_bar}
|
47
|
+
|
48
|
+
process.working_dir = "/tmp/app"
|
49
|
+
process.daemonize = true
|
50
|
+
process.environment = {"PORT"=>"5200"}
|
51
|
+
process.stop_signals = [:quit, 30.seconds, :term, 5.seconds, :kill]
|
52
|
+
process.stop_grace_time = 45.seconds
|
53
|
+
|
54
|
+
process.stdout = process.stderr = "/var/log/app/app-foo_bar-1.log"
|
55
|
+
|
56
|
+
process.monitor_children do |children|
|
57
|
+
children.stop_command "kill {{PID}}"
|
58
|
+
end
|
59
|
+
|
60
|
+
process.group = "app-foo_bar"
|
61
|
+
end
|
62
|
+
|
63
|
+
app.process("foo-bar-1") do |process|
|
64
|
+
process.start_command = %Q{./foo-bar}
|
65
|
+
|
66
|
+
process.working_dir = "/tmp/app"
|
67
|
+
process.daemonize = true
|
68
|
+
process.environment = {"PORT"=>"5300"}
|
69
|
+
process.stop_signals = [:quit, 30.seconds, :term, 5.seconds, :kill]
|
70
|
+
process.stop_grace_time = 45.seconds
|
71
|
+
|
72
|
+
process.stdout = process.stderr = "/var/log/app/app-foo-bar-1.log"
|
73
|
+
|
74
|
+
process.monitor_children do |children|
|
75
|
+
|
76
|
+
children.stop_command "kill {{PID}}"
|
77
|
+
end
|
78
|
+
|
79
|
+
process.group = "app-foo-bar"
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,4 @@
|
|
1
|
+
# ----- foreman app processes -----
|
2
|
+
AP01:4:respawn:/bin/su - app -c 'cd /tmp/app;export PORT=5000;./alpha >> /var/log/app/alpha-1.log 2>&1'
|
3
|
+
AP02:4:respawn:/bin/su - app -c 'cd /tmp/app;export PORT=5001;./alpha >> /var/log/app/alpha-2.log 2>&1'
|
4
|
+
# ----- end foreman app processes -----
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# ----- foreman app processes -----
|
2
|
+
AP01:4:respawn:/bin/su - app -c 'cd /tmp/app;export PORT=5000;./alpha >> /var/log/app/alpha-1.log 2>&1'
|
3
|
+
AP02:4:respawn:/bin/su - app -c 'cd /tmp/app;export PORT=5100;./bravo >> /var/log/app/bravo-1.log 2>&1'
|
4
|
+
AP03:4:respawn:/bin/su - app -c 'cd /tmp/app;export PORT=5200;./foo_bar >> /var/log/app/foo_bar-1.log 2>&1'
|
5
|
+
AP04:4:respawn:/bin/su - app -c 'cd /tmp/app;export PORT=5300;./foo-bar >> /var/log/app/foo-bar-1.log 2>&1'
|
6
|
+
# ----- end foreman app processes -----
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>Label</key>
|
6
|
+
<string>app-alpha-1</string>
|
7
|
+
<key>EnvironmentVariables</key>
|
8
|
+
<dict>
|
9
|
+
<key>PORT</key>
|
10
|
+
<string>5000</string>
|
11
|
+
</dict>
|
12
|
+
<key>ProgramArguments</key>
|
13
|
+
<array>
|
14
|
+
<string>./alpha</string>
|
15
|
+
</array>
|
16
|
+
<key>KeepAlive</key>
|
17
|
+
<true/>
|
18
|
+
<key>RunAtLoad</key>
|
19
|
+
<true/>
|
20
|
+
<key>StandardOutPath</key>
|
21
|
+
<string>/var/log/app/app-alpha-1.log</string>
|
22
|
+
<key>StandardErrorPath</key>
|
23
|
+
<string>/var/log/app/app-alpha-1.log</string>
|
24
|
+
<key>UserName</key>
|
25
|
+
<string>app</string>
|
26
|
+
<key>WorkingDirectory</key>
|
27
|
+
<string>/tmp/app</string>
|
28
|
+
</dict>
|
29
|
+
</plist>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>Label</key>
|
6
|
+
<string>app-bravo-1</string>
|
7
|
+
<key>EnvironmentVariables</key>
|
8
|
+
<dict>
|
9
|
+
<key>PORT</key>
|
10
|
+
<string>5100</string>
|
11
|
+
</dict>
|
12
|
+
<key>ProgramArguments</key>
|
13
|
+
<array>
|
14
|
+
<string>./bravo</string>
|
15
|
+
</array>
|
16
|
+
<key>KeepAlive</key>
|
17
|
+
<true/>
|
18
|
+
<key>RunAtLoad</key>
|
19
|
+
<true/>
|
20
|
+
<key>StandardOutPath</key>
|
21
|
+
<string>/var/log/app/app-bravo-1.log</string>
|
22
|
+
<key>StandardErrorPath</key>
|
23
|
+
<string>/var/log/app/app-bravo-1.log</string>
|
24
|
+
<key>UserName</key>
|
25
|
+
<string>app</string>
|
26
|
+
<key>WorkingDirectory</key>
|
27
|
+
<string>/tmp/app</string>
|
28
|
+
</dict>
|
29
|
+
</plist>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>Label</key>
|
6
|
+
<string>app-alpha-1</string>
|
7
|
+
<key>EnvironmentVariables</key>
|
8
|
+
<dict>
|
9
|
+
<key>PORT</key>
|
10
|
+
<string>5000</string>
|
11
|
+
</dict>
|
12
|
+
<key>ProgramArguments</key>
|
13
|
+
<array>
|
14
|
+
<string>./alpha</string>
|
15
|
+
<string>charlie</string>
|
16
|
+
</array>
|
17
|
+
<key>KeepAlive</key>
|
18
|
+
<true/>
|
19
|
+
<key>RunAtLoad</key>
|
20
|
+
<true/>
|
21
|
+
<key>StandardOutPath</key>
|
22
|
+
<string>/var/log/app/app-alpha-1.log</string>
|
23
|
+
<key>StandardErrorPath</key>
|
24
|
+
<string>/var/log/app/app-alpha-1.log</string>
|
25
|
+
<key>UserName</key>
|
26
|
+
<string>app</string>
|
27
|
+
<key>WorkingDirectory</key>
|
28
|
+
<string>/tmp/app</string>
|
29
|
+
</dict>
|
30
|
+
</plist>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
[program:app-alpha-1]
|
2
|
+
command=./alpha
|
3
|
+
autostart=true
|
4
|
+
autorestart=true
|
5
|
+
stdout_logfile=/var/log/app/alpha-1.log
|
6
|
+
stderr_logfile=/var/log/app/alpha-1.error.log
|
7
|
+
user=app
|
8
|
+
directory=/tmp/app
|
9
|
+
environment=FOO="bar",URL="http://example.com/api?foo=bar&baz=1",PORT="5000"
|
10
|
+
|
11
|
+
[program:app-bravo-1]
|
12
|
+
command=./bravo
|
13
|
+
autostart=true
|
14
|
+
autorestart=true
|
15
|
+
stdout_logfile=/var/log/app/bravo-1.log
|
16
|
+
stderr_logfile=/var/log/app/bravo-1.error.log
|
17
|
+
user=app
|
18
|
+
directory=/tmp/app
|
19
|
+
environment=FOO="bar",URL="http://example.com/api?foo=bar&baz=1",PORT="5100"
|
20
|
+
|
21
|
+
[program:app-foo_bar-1]
|
22
|
+
command=./foo_bar
|
23
|
+
autostart=true
|
24
|
+
autorestart=true
|
25
|
+
stdout_logfile=/var/log/app/foo_bar-1.log
|
26
|
+
stderr_logfile=/var/log/app/foo_bar-1.error.log
|
27
|
+
user=app
|
28
|
+
directory=/tmp/app
|
29
|
+
environment=FOO="bar",URL="http://example.com/api?foo=bar&baz=1",PORT="5200"
|
30
|
+
|
31
|
+
[program:app-foo-bar-1]
|
32
|
+
command=./foo-bar
|
33
|
+
autostart=true
|
34
|
+
autorestart=true
|
35
|
+
stdout_logfile=/var/log/app/foo-bar-1.log
|
36
|
+
stderr_logfile=/var/log/app/foo-bar-1.error.log
|
37
|
+
user=app
|
38
|
+
directory=/tmp/app
|
39
|
+
environment=FOO="bar",URL="http://example.com/api?foo=bar&baz=1",PORT="5300"
|
40
|
+
|
41
|
+
[group:app]
|
42
|
+
programs=app-alpha-1,app-bravo-1,app-foo_bar-1,app-foo-bar-1
|
@@ -0,0 +1,22 @@
|
|
1
|
+
[program:app-alpha-1]
|
2
|
+
command=./alpha
|
3
|
+
autostart=true
|
4
|
+
autorestart=true
|
5
|
+
stdout_logfile=/var/log/app/alpha-1.log
|
6
|
+
stderr_logfile=/var/log/app/alpha-1.error.log
|
7
|
+
user=app
|
8
|
+
directory=/tmp/app
|
9
|
+
environment=PORT="5000"
|
10
|
+
|
11
|
+
[program:app-alpha-2]
|
12
|
+
command=./alpha
|
13
|
+
autostart=true
|
14
|
+
autorestart=true
|
15
|
+
stdout_logfile=/var/log/app/alpha-2.log
|
16
|
+
stderr_logfile=/var/log/app/alpha-2.error.log
|
17
|
+
user=app
|
18
|
+
directory=/tmp/app
|
19
|
+
environment=PORT="5001"
|
20
|
+
|
21
|
+
[group:app]
|
22
|
+
programs=app-alpha-1,app-alpha-2
|
@@ -0,0 +1,18 @@
|
|
1
|
+
[Unit]
|
2
|
+
PartOf=app.target
|
3
|
+
StopWhenUnneeded=yes
|
4
|
+
|
5
|
+
[Service]
|
6
|
+
User=app
|
7
|
+
WorkingDirectory=/tmp/app
|
8
|
+
Environment=PORT=5000
|
9
|
+
Environment=PS=alpha.1
|
10
|
+
ExecStart=/bin/bash -lc 'exec -a "app-alpha.1" ./alpha'
|
11
|
+
Restart=always
|
12
|
+
RestartSec=14s
|
13
|
+
StandardInput=null
|
14
|
+
StandardOutput=syslog
|
15
|
+
StandardError=syslog
|
16
|
+
SyslogIdentifier=%n
|
17
|
+
KillMode=mixed
|
18
|
+
TimeoutStopSec=5
|
@@ -0,0 +1,18 @@
|
|
1
|
+
[Unit]
|
2
|
+
PartOf=app.target
|
3
|
+
StopWhenUnneeded=yes
|
4
|
+
|
5
|
+
[Service]
|
6
|
+
User=app
|
7
|
+
WorkingDirectory=/tmp/app
|
8
|
+
Environment=PORT=5001
|
9
|
+
Environment=PS=alpha.2
|
10
|
+
ExecStart=/bin/bash -lc 'exec -a "app-alpha.2" ./alpha'
|
11
|
+
Restart=always
|
12
|
+
RestartSec=14s
|
13
|
+
StandardInput=null
|
14
|
+
StandardOutput=syslog
|
15
|
+
StandardError=syslog
|
16
|
+
SyslogIdentifier=%n
|
17
|
+
KillMode=mixed
|
18
|
+
TimeoutStopSec=5
|
@@ -0,0 +1,18 @@
|
|
1
|
+
[Unit]
|
2
|
+
PartOf=app.target
|
3
|
+
StopWhenUnneeded=yes
|
4
|
+
|
5
|
+
[Service]
|
6
|
+
User=app
|
7
|
+
WorkingDirectory=/tmp/app
|
8
|
+
Environment=PORT=5100
|
9
|
+
Environment=PS=bravo.1
|
10
|
+
ExecStart=/bin/bash -lc 'exec -a "app-bravo.1" ./bravo'
|
11
|
+
Restart=always
|
12
|
+
RestartSec=14s
|
13
|
+
StandardInput=null
|
14
|
+
StandardOutput=syslog
|
15
|
+
StandardError=syslog
|
16
|
+
SyslogIdentifier=%n
|
17
|
+
KillMode=mixed
|
18
|
+
TimeoutStopSec=5
|