deploify 0.2.13 → 0.2.14

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.
@@ -58,6 +58,8 @@ Capistrano::Configuration.instance(:must_exist).load do
58
58
 
59
59
  set :use_monit, true
60
60
 
61
+ set :logrotate_days, 30
62
+
61
63
  # Prompt user for missing values if not supplied
62
64
  set(:application) do
63
65
  Capistrano::CLI.ui.ask "Enter name of project (no spaces)" do |q|
@@ -123,6 +125,7 @@ Capistrano::Configuration.instance(:must_exist).load do
123
125
 
124
126
  # webserver stuff
125
127
  set :force_domain_with_www, false
128
+ set :force_domain_without_www, false
126
129
 
127
130
  on :load, "deploify:connect_canonical_tasks"
128
131
 
@@ -1,7 +1,7 @@
1
1
  <%= shared_path %>/log/access.log, <%= shared_path %>/log/error.log {
2
2
  daily
3
3
  missingok
4
- rotate 15
4
+ rotate <%= logrotate_days %>
5
5
  compress
6
6
  delaycompress
7
7
  sharedscripts
@@ -25,6 +25,11 @@ server {
25
25
  ssl_certificate <%= deploy_to %>/nginx/<%= rails_env %>.crt;
26
26
  ssl_certificate_key <%= deploy_to %>/nginx/<%= rails_env %>.key;
27
27
 
28
+ <%- if force_domain_without_www -%>
29
+ if ($host !~* ^<%= domain %>$) {
30
+ rewrite ^(.*) http://<%= domain %>$1 permanent;
31
+ }
32
+ <%- end -%>
28
33
  <%- if force_domain_with_www -%>
29
34
  if ($host !~* ^www.<%= domain %>$) {
30
35
  rewrite ^(.*) https://www.<%= domain %>$1 permanent;
@@ -12,6 +12,11 @@ server {
12
12
  access_log <%= shared_path %>/log/access.log;
13
13
  error_log <%= shared_path %>/log/error.log;
14
14
 
15
+ <%- if force_domain_without_www -%>
16
+ if ($host !~* ^<%= domain %>$) {
17
+ rewrite ^(.*) http://<%= domain %>$1 permanent;
18
+ }
19
+ <%- end -%>
15
20
  <%- if force_domain_with_www -%>
16
21
  if ($host !~* ^www.<%= domain %>$) {
17
22
  rewrite ^(.*) http://www.<%= domain %>$1 permanent;
@@ -12,6 +12,11 @@ server {
12
12
  access_log <%= shared_path %>/log/access.log;
13
13
  error_log <%= shared_path %>/log/error.log;
14
14
 
15
+ <%- if force_domain_without_www -%>
16
+ if ($host !~* ^<%= domain %>$) {
17
+ rewrite ^(.*) http://<%= domain %>$1 permanent;
18
+ }
19
+ <%- end -%>
15
20
  <%- if force_domain_with_www -%>
16
21
  if ($host !~* ^www.<%= domain %>$) {
17
22
  rewrite ^(.*) http://www.<%= domain %>$1 permanent;
@@ -77,6 +82,11 @@ server {
77
82
  ssl_certificate <%= deploy_to %>/nginx/<%= rails_env %>.crt;
78
83
  ssl_certificate_key <%= deploy_to %>/nginx/<%= rails_env %>.key;
79
84
 
85
+ <%- if force_domain_without_www -%>
86
+ if ($host !~* ^<%= domain %>$) {
87
+ rewrite ^(.*) http://<%= domain %>$1 permanent;
88
+ }
89
+ <%- end -%>
80
90
  <%- if force_domain_with_www -%>
81
91
  if ($host !~* ^www.<%= domain %>$) {
82
92
  rewrite ^(.*) https://www.<%= domain %>$1 permanent;
@@ -1,7 +1,7 @@
1
1
  <%= shared_path %>/log/<%= rails_env %>.log, <%= shared_path %>/log/passenger.log {
2
2
  daily
3
3
  missingok
4
- rotate 30
4
+ rotate <%= logrotate_days %>
5
5
  compress
6
6
  delaycompress
7
7
  sharedscripts
@@ -0,0 +1,12 @@
1
+ <%= shared_path %>/log/<%= rails_env %>.log, <%= shared_path %>/log/thin*.log {
2
+ daily
3
+ missingok
4
+ rotate <%= logrotate_days %>
5
+ compress
6
+ delaycompress
7
+ sharedscripts
8
+ dateext
9
+ postrotate
10
+ touch /usr/sbin/service thin-<%= application %> graceful
11
+ endscript
12
+ }
@@ -57,7 +57,7 @@ function graceful() {
57
57
  echo "Restarting thin cluster for application '${APPLICATION}' with one-by-one option"
58
58
  running_servers
59
59
  if [ ${THIN_SERVERS} -eq $? ]; then
60
- su - $USER -c "${CMD_RESTART} -O -w 20"
60
+ su - $USER -c "${CMD_RESTART} -O -w 60"
61
61
  else
62
62
  stop
63
63
  start
@@ -1,7 +1,7 @@
1
1
  module Deploify
2
2
  MAJOR = 0
3
3
  MINOR = 2
4
- PATCH = 13
4
+ PATCH = 14
5
5
  BUILD = nil
6
6
 
7
7
  if BUILD.nil?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploify
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 13
10
- version: 0.2.13
9
+ - 14
10
+ version: 0.2.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Riman
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-12-26 00:00:00 Z
18
+ date: 2013-01-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bundler