capistrano-unformatt 1.1 → 1.3
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 -0
- data/capistrano-unformatt.gemspec +1 -1
- data/vendor/templates/nginx.conf.erb +8 -7
- data/vendor/templates/puma.daemon.erb +1 -1
- data/vendor/templates/puma.rb.erb +6 -3
- data/vendor/templates/sidekiq.daemon.erb +2 -2
- data/vendor/templates/sidekiq.monit.erb +1 -1
- data/vendor/templates/sunspot.daemon.erb +1 -1
- data/vendor/templates/unicorn.daemon.erb +1 -1
- data/vendor/templates/unicorn.rb.erb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae7b9e2cb109a5ac464ff131875a670fafba2a8b
|
4
|
+
data.tar.gz: 373438a5a8ef4d16af7323f565b8b6e99264416d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b0e75b0037c6be5ea676510150c4082576d2bafc37617e4a9cab3cdf7fbfd34ebd4e28821c60ae500ab5c6b5d1d94418ef4e302e8f42495bafabcdca0f1000b
|
7
|
+
data.tar.gz: b6b53e26f720b07ede0cb157aeb2a77b6b69fcd63c688c84d8a896b533a0c1b0139b65ff37321cb9ae6befac53c3659fdca7a9067202c9a73c71352c7511407d
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "capistrano-unformatt"
|
7
|
-
spec.version = '1.
|
7
|
+
spec.version = '1.3'
|
8
8
|
spec.authors = ["unformatt"]
|
9
9
|
spec.email = ["unformatt@gmail.com"]
|
10
10
|
spec.description = "Custom recipes for Unformatt projects"
|
@@ -4,7 +4,7 @@ upstream <%=fetch(:application)%> {
|
|
4
4
|
|
5
5
|
<%- if fetch(:nginx_use_ssl) -%>
|
6
6
|
server {
|
7
|
-
listen 80
|
7
|
+
listen <%= fetch(:nginx_http_port, 80) %>;
|
8
8
|
server_name <%=fetch(:nginx_server_names)%>;
|
9
9
|
rewrite ^ https://$server_name$request_uri? permanent;
|
10
10
|
}
|
@@ -12,7 +12,7 @@ server {
|
|
12
12
|
|
13
13
|
server {
|
14
14
|
<%- if fetch(:nginx_use_ssl) -%>
|
15
|
-
listen 443
|
15
|
+
listen <%= fetch(:nginx_https_port, 443) %>;
|
16
16
|
ssl on;
|
17
17
|
ssl_certificate <%=fetch(:nginx_ssl_certificate)%>;
|
18
18
|
ssl_certificate_key <%=fetch(:nginx_ssl_private_key)%>;
|
@@ -30,8 +30,8 @@ server {
|
|
30
30
|
error_log <%=shared_path%>/log/nginx-error.log;
|
31
31
|
rewrite_log on;
|
32
32
|
|
33
|
-
client_max_body_size 4G
|
34
|
-
keepalive_timeout 5
|
33
|
+
client_max_body_size <%=fetch(:nginx_max_body_size, '4G')%>;
|
34
|
+
keepalive_timeout <%=fetch(:nginx_keepalive_timeout, '5')%>;
|
35
35
|
|
36
36
|
if (-f $document_root/public/maintenance.html) {
|
37
37
|
rewrite ^(.*)$ /public/maintenance.html;
|
@@ -62,9 +62,10 @@ server {
|
|
62
62
|
<%- if fetch(:nginx_use_ssl) -%>
|
63
63
|
proxy_set_header X-Forwarded-Proto https;
|
64
64
|
<%- end -%>
|
65
|
-
proxy_headers_hash_bucket_size 1024
|
66
|
-
proxy_headers_hash_max_size 512
|
67
|
-
proxy_read_timeout <%=fetch(:nginx_read_timeout)%>;
|
65
|
+
proxy_headers_hash_bucket_size <%=fetch(:nginx_hash_bucket_size, 1024)%>;
|
66
|
+
proxy_headers_hash_max_size <%=fetch(:nginx_hash_max_size, 512)%>;
|
67
|
+
proxy_read_timeout <%=fetch(:nginx_read_timeout, 60)%>;
|
68
|
+
proxy_send_timeout <%=fetch(:nginx_send_timeout, 60)%>;
|
68
69
|
proxy_redirect off;
|
69
70
|
proxy_pass http://<%=fetch(:application)%>;
|
70
71
|
include proxy_params;
|
@@ -1,14 +1,17 @@
|
|
1
1
|
directory "<%=current_path%>"
|
2
|
-
environment "production"
|
2
|
+
environment "<%= fetch(:rails_env, 'production') %>"
|
3
3
|
daemonize true
|
4
4
|
|
5
|
+
worker_timeout <%= fetch(:app_server_timeout, 60) %>
|
6
|
+
worker_boot_timeout <%= fetch(:app_server_timeout, fetch(:app_server_timeout, 60)) %>
|
7
|
+
|
5
8
|
pidfile '<%="#{shared_path}/pids/puma.pid"%>'
|
6
9
|
state_path '<%="#{shared_path}/pids/puma.state"%>'
|
7
10
|
stdout_redirect "<%="#{shared_path}/log/puma.stdout.log"%>", "<%="#{shared_path}/log/puma.stderr.log"%>", true
|
8
11
|
|
9
|
-
threads 0, 8
|
12
|
+
threads <%= fetch(:app_server_min_threads, 0) %>, <%= fetch(:app_server_max_threads, 8) %>
|
10
13
|
bind "<%="tcp://#{fetch(:app_server_host)}:#{fetch(:app_server_port)}"%>"
|
11
|
-
workers 4
|
14
|
+
workers <%= fetch(:app_server_workers, 4) %>
|
12
15
|
|
13
16
|
preload_app!
|
14
17
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# <%= "Start or stop #{fetch(:application)}-sidekiq" %>
|
4
4
|
#
|
5
|
-
#
|
5
|
+
# <%= fetch(:daemon_author_name) %>
|
6
6
|
|
7
7
|
### BEGIN INIT INFO
|
8
8
|
# Provides: <%= "#{fetch(:application)}-sidekiq" %>
|
@@ -34,7 +34,7 @@ case "$1" in
|
|
34
34
|
|
35
35
|
if [ -z "$(getPID)" ]; then
|
36
36
|
cd <%=current_path%>
|
37
|
-
bundle exec sidekiq -d -v -P $PIDFILE -e $RAILS_ENV -L <%= "#{shared_path}/log/sidekiq.log" %>
|
37
|
+
bundle exec sidekiq -d -v -c <%= fetch(:sidekiq_threads_quantity, 4) %> -g <%= fetch(:sidekiq_queue_label, fetch(:sidekiq_queue_name, fetch(:application))) %> -q <%= fetch(:sidekiq_queue_name, fetch(:application)) %> -P $PIDFILE -e $RAILS_ENV -L <%= "#{shared_path}/log/sidekiq.log" %>
|
38
38
|
|
39
39
|
echo "started!"
|
40
40
|
else
|
@@ -2,5 +2,5 @@ check process <%="#{fetch(:application)}-sidekiq"%>
|
|
2
2
|
with pidfile <%="#{shared_path}/pids/sidekiq.pid"%>
|
3
3
|
group <%=fetch(:application)%>
|
4
4
|
start program = "<%="#{fetch(:daemons_path)}/#{fetch(:application)}-sidekiq start"%>"
|
5
|
-
as uid <%=fetch(:monit_user)%> and gid <%=fetch(:monit_group)%>
|
5
|
+
as uid <%=fetch(:monit_user,'root')%> and gid <%=fetch(:monit_group,'root')%>
|
6
6
|
stop program = "<%="#{fetch(:daemons_path)}/#{fetch(:application)}-sidekiq stop"%>"
|
@@ -1,9 +1,9 @@
|
|
1
|
-
ENV['RAILS_ENV'] = 'production'
|
2
|
-
worker_processes 4
|
1
|
+
ENV['RAILS_ENV'] = '<%= fetch(:rails_env, 'production') %>'
|
2
|
+
worker_processes <%= fetch(:app_server_workers, 4) %>
|
3
3
|
|
4
4
|
listen "<%="#{fetch(:app_server_host)}:#{fetch(:app_server_port)}"%>", :backlog => 2048
|
5
5
|
|
6
|
-
timeout 60
|
6
|
+
timeout <%= fetch(:app_server_timeout, 60) %>
|
7
7
|
|
8
8
|
working_directory "<%=current_path%>"
|
9
9
|
|