pixelforce_recipes 0.7 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23b5a059ff6c01a74cb2a9129e32722e1d351989
4
- data.tar.gz: 0129c285267bc58f381f6bbbcd99000f826a706b
3
+ metadata.gz: 42b7d58eb36030dcc00600ce231078c122c20f3b
4
+ data.tar.gz: 1f28e8d106935bb6c525fa791aaf7e4d1ca88194
5
5
  SHA512:
6
- metadata.gz: b4243926b04d5cb89aa2bf2fce1852c3657f4a73b51e9be20e563c2a181b6100bf83794f2328cf3f3ad2d92293bdad5329210ee129b0f01d28831db5d920c369
7
- data.tar.gz: c3186189eaf6ee671175b6df92eb3a3b5a8abe53ba971228d7a3beb3503437e2691b0ba49eaf0eb8ef24071a1ab885522a2a5a47287b83cbc2447606f3586a68
6
+ metadata.gz: 1d5ef1d74316d14ae055a3597e94269cbe7fb8b4c83c9bb9885a4f5a71a05ae75d99dbde039963641ae7471bf8a7bb8c1814f8018878e228b3c64707e3bfe59a
7
+ data.tar.gz: f2878e214482ab60c9617c06778bfb9ef63d63b05d09715cbaec3a4dbefeb0c697205494dc6674a84b1286832b690b05b02ac95cd47649a2d7d8b763b798975d
data/Gemfile.lock CHANGED
@@ -1,26 +1,26 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pixelforce_recipes (0.1.0)
4
+ pixelforce_recipes (0.8)
5
5
  capistrano (> 2.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- airbrussh (1.1.0)
10
+ airbrussh (1.3.0)
11
11
  sshkit (>= 1.6.1, != 1.7.0)
12
- capistrano (3.6.1)
12
+ capistrano (3.10.2)
13
13
  airbrussh (>= 1.0.0)
14
- capistrano-harrow
15
14
  i18n
16
15
  rake (>= 10.0.0)
17
16
  sshkit (>= 1.9.0)
18
- capistrano-harrow (0.5.3)
17
+ concurrent-ruby (1.0.5)
19
18
  diff-lcs (1.2.5)
20
- i18n (0.7.0)
19
+ i18n (1.0.1)
20
+ concurrent-ruby (~> 1.0)
21
21
  net-scp (1.2.1)
22
22
  net-ssh (>= 2.6.5)
23
- net-ssh (3.2.0)
23
+ net-ssh (4.2.0)
24
24
  rake (10.5.0)
25
25
  rspec (3.5.0)
26
26
  rspec-core (~> 3.5.0)
@@ -35,7 +35,7 @@ GEM
35
35
  diff-lcs (>= 1.2.0, < 2.0)
36
36
  rspec-support (~> 3.5.0)
37
37
  rspec-support (3.5.0)
38
- sshkit (1.11.2)
38
+ sshkit (1.16.0)
39
39
  net-scp (>= 1.1.2)
40
40
  net-ssh (>= 2.8.0)
41
41
 
@@ -49,4 +49,4 @@ DEPENDENCIES
49
49
  rspec (~> 3.0)
50
50
 
51
51
  BUNDLED WITH
52
- 1.12.5
52
+ 1.15.0
@@ -0,0 +1,14 @@
1
+ if Capistrano::Configuration.instance(false)
2
+
3
+ Capistrano::Configuration.instance(true).load do |instance|
4
+
5
+ namespace :logrotate do
6
+
7
+ desc "Setup logrotate configuration for this application"
8
+ task :setup, roles: :app do
9
+ template "logrotate.erb", "/tmp/logrotate"
10
+ run "#{sudo} mv /tmp/logrotate /etc/logrotate.d/#{application}"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -12,6 +12,7 @@ if Capistrano::Configuration.instance(false)
12
12
  run "#{sudo} update-rc.d #{application} defaults"
13
13
  template "nginx_puma_config.erb", "/tmp/nginx_puma_config"
14
14
  run "#{sudo} mv /tmp/nginx_puma_config /etc/nginx/sites-enabled/#{application}"
15
+ template "logrotate.erb"
15
16
  end
16
17
  # after "deploy:setup", "nginx:setup"
17
18
 
@@ -0,0 +1,8 @@
1
+ <%= deploy_to %>/shared/log/*.log {
2
+ daily
3
+ missingok
4
+ copytruncate
5
+ rotate 7
6
+ compress
7
+ notifempty
8
+ }
@@ -5,7 +5,7 @@ upstream <%= application %> {
5
5
  server {
6
6
  listen 80;
7
7
  server_name <%= server_address %>;
8
- root /home/deploy/<%= application %>/current/public;
8
+ root <%= deploy_to %>/current/public;
9
9
 
10
10
  try_files $uri/index.html $uri @<%= application %>;
11
11
 
@@ -1,14 +1,14 @@
1
1
  upstream <%= application %> {
2
- server unix:///home/ubuntu/<%= application %>/shared/sockets/<%= application %>.sock;
2
+ server unix:/tmp/<%= application %>.sock fail_timeout=0;
3
3
  }
4
4
 
5
5
  server {
6
6
  listen 80 default_server deferred;
7
7
  server_name <%= server_address %>;
8
8
 
9
- root /home/ubuntu/<%= application %>/current/public;
10
- access_log /home/ubuntu/<%= application %>/current/log/nginx.access.log;
11
- error_log /home/ubuntu/<%= application %>/current/log/nginx.error.log info;
9
+ root <%= deploy_to %>/current/public;
10
+ access_log <%= deploy_to %>/current/log/nginx.access.log;
11
+ error_log <%= deploy_to %>/current/log/nginx.error.log info;
12
12
 
13
13
  location ^~ /assets/ {
14
14
  gzip_static on;
@@ -1,3 +1,3 @@
1
1
  module PixelforceRecipes
2
- VERSION = "0.7"
2
+ VERSION = "0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixelforce_recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.7'
4
+ version: '0.8'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Zhang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-25 00:00:00.000000000 Z
11
+ date: 2018-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,8 +84,10 @@ files:
84
84
  - bin/setup
85
85
  - lib/pixelforce_recipes.rb
86
86
  - lib/pixelforce_recipes/base.rb
87
+ - lib/pixelforce_recipes/logrotate.rb
87
88
  - lib/pixelforce_recipes/puma.rb
88
89
  - lib/pixelforce_recipes/sidekiq.rb
90
+ - lib/pixelforce_recipes/templates/logrotate.erb
89
91
  - lib/pixelforce_recipes/templates/nginx_config.erb
90
92
  - lib/pixelforce_recipes/templates/nginx_puma_config.erb
91
93
  - lib/pixelforce_recipes/templates/puma_init.erb