luban-rack 0.2.25 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -2
- data/lib/luban/deployment/applications/rack/configurator.rb +1 -1
- data/lib/luban/deployment/applications/rack/templates/thin/thin.monitrc.erb +1 -1
- data/lib/luban/deployment/applications/rack/templates/thin/thin.nginx.http.proxy.conf.erb +3 -2
- data/lib/luban/deployment/applications/rack/version.rb +1 -1
- data/lib/luban/deployment/applications/rack/web_server.rb +1 -1
- data/lib/luban/deployment/applications/rack/web_servers/puma.rb +11 -2
- data/lib/luban/deployment/applications/rack/web_servers/thin.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dcdf2aa0a85983d8e4812d535c97f0ecd5fbb4a
|
4
|
+
data.tar.gz: 325a2d35ef82ea6e45311e994d61982a84d84c97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acf7051bdff689900968d367dbe9bb0af9f5e09c91b3eff3007d2fe5098f0fcb32381e8378d47dd460fea70fdf6b992c09fd9c29a3c2960e45434d1dd22c99e2
|
7
|
+
data.tar.gz: 38dfc837affd992f4db40a2b104639cc6438dea4c956de64efce7a961ef9fae718d536de0d48a7fd2c5cf217869a1849d5915c0eb155f2860db253e33156efb6
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
-
## Version 0.
|
3
|
+
## Version 0.3.0 (Mar 28, 2017)
|
4
|
+
* Set up Puma/Thin web server configurations appropriately for dockerization
|
5
|
+
|
6
|
+
Bug fixes:
|
7
|
+
* Compared excluded templates with their basename instead of full path
|
8
|
+
|
9
|
+
## Version 0.2.25 (Feb 23, 2017)
|
4
10
|
|
5
11
|
Minor enhancements:
|
6
12
|
* Bump up gem dependency of Luban to version 0.12.8
|
7
13
|
* To make use of an enhancement of cleaning up Bundler environment before executing any worker tasks
|
8
14
|
* So that code can be cleaned up in a more concise way
|
9
15
|
|
10
|
-
## Version 0.2.24 (Jan 03,
|
16
|
+
## Version 0.2.24 (Jan 03, 2017)
|
11
17
|
|
12
18
|
Minor enhancements:
|
13
19
|
* Cleaned up Bundler environment for control actions and web server publishing
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Monit Monit configuration for Thin
|
2
2
|
|
3
3
|
<% opts = web_server[:opts] -%>
|
4
|
-
<% opts[:servers].times do |n| -%>
|
4
|
+
<% (opts[:servers] || 1).times do |n| -%>
|
5
5
|
check process <%= service_entry %>.<%= current_web_server %>.<%= n %>
|
6
6
|
with pidfile <%= pid_file_path(n) %>
|
7
7
|
group <%= service_entry %>
|
@@ -1,17 +1,18 @@
|
|
1
1
|
# Nginx reverse proxy configuration for Thin
|
2
2
|
|
3
3
|
<% opts = web_server[:opts] -%>
|
4
|
+
<% servers = opts[:servers] || 1 -%>
|
4
5
|
upstream <%= service_entry %> {
|
5
6
|
# fail_timeout=0 means we always retry an upstream even if it failed
|
6
7
|
# to return a good HTTP response
|
7
8
|
|
8
9
|
<%- if tcp_socket? -%>
|
9
|
-
<%-
|
10
|
+
<%- servers.times do |n| -%>
|
10
11
|
server <%= opts[:address] %>:<%= opts[:port] + n %> fail_timeout=0;
|
11
12
|
<%- end -%>
|
12
13
|
<%- end -%>
|
13
14
|
<%- if unix_socket? -%>
|
14
|
-
<%-
|
15
|
+
<%- servers.times do |n| -%>
|
15
16
|
server unix:<%= socket_file_path(n) %> fail_timeout=0;
|
16
17
|
<%- end -%>
|
17
18
|
<%- end -%>
|
@@ -13,8 +13,9 @@ module Luban
|
|
13
13
|
socket: socket_file_path.to_s,
|
14
14
|
directory: release_path.to_s,
|
15
15
|
environment: stage,
|
16
|
+
rackup: release_path.join('config.ru').to_s,
|
16
17
|
# Daemon options
|
17
|
-
daemonize:
|
18
|
+
daemonize: !dockerized?,
|
18
19
|
pidfile: pid_file_path.to_s,
|
19
20
|
state_path: state_file_path.to_s,
|
20
21
|
redirect_stdout: log_file_path.to_s,
|
@@ -78,6 +79,10 @@ module Luban
|
|
78
79
|
|
79
80
|
protected
|
80
81
|
|
82
|
+
def init_docker_command
|
83
|
+
docker_command ["bundle", "exec", "puma", "-C", control_file_path.to_s]
|
84
|
+
end
|
85
|
+
|
81
86
|
def set_web_server_options
|
82
87
|
super.tap do |opts|
|
83
88
|
[:uri, :stdout_redirect, :workers, :threads, :control, :tuning].each do |param|
|
@@ -107,7 +112,11 @@ module Luban
|
|
107
112
|
end
|
108
113
|
|
109
114
|
def set_workers_options(opts)
|
110
|
-
|
115
|
+
if dockerized?
|
116
|
+
opts.delete(:servers)
|
117
|
+
else
|
118
|
+
opts[:workers] = opts.delete(:servers)
|
119
|
+
end
|
111
120
|
end
|
112
121
|
|
113
122
|
def set_threads_options(opts)
|
@@ -94,7 +94,7 @@ module Luban
|
|
94
94
|
chdir: release_path.to_s,
|
95
95
|
environment: stage,
|
96
96
|
# Daemon options
|
97
|
-
daemonize:
|
97
|
+
daemonize: !dockerized?,
|
98
98
|
log: log_file_path.to_s,
|
99
99
|
pid: pid_file_path.to_s,
|
100
100
|
tag: "#{env_name}:#{release_tag}",
|
@@ -131,6 +131,10 @@ module Luban
|
|
131
131
|
|
132
132
|
protected
|
133
133
|
|
134
|
+
def init_docker_command
|
135
|
+
docker_command ["bundle", "exec", "thin", "start", "-C", control_file_path.to_s]
|
136
|
+
end
|
137
|
+
|
134
138
|
def set_web_server_options
|
135
139
|
super.tap do |opts|
|
136
140
|
@unix_socket = !!opts.delete(:unix_socket)
|
@@ -141,6 +145,10 @@ module Luban
|
|
141
145
|
else
|
142
146
|
opts.delete(:socket)
|
143
147
|
end
|
148
|
+
if dockerized?
|
149
|
+
opts.delete(:servers)
|
150
|
+
opts.delete(:wait)
|
151
|
+
end
|
144
152
|
end
|
145
153
|
end
|
146
154
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luban-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rubyist Chi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: luban
|