recipiez 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Recipiez
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
data/recipes/monit.rb CHANGED
@@ -8,9 +8,15 @@ Capistrano::Configuration.instance(true).load do
8
8
  sudo "mv nginx.conf /etc/monit/conf.d/nginx.conf"
9
9
  sudo "/etc/init.d/monit restart"
10
10
  end
11
-
11
+
12
+
13
+ # /usr/local/sbin/spawner.sh
12
14
  desc "configures monit for thin"
13
15
  task :thin, :roles => :web do
16
+ put render('spawner_monit', binding), "spawner.sh"
17
+ run "chmod +x spawner.sh"
18
+ sudo "mv spawner.sh /usr/local/sbin/spawner.sh"
19
+
14
20
  put render('thin_monit', binding), "#{application}.conf"
15
21
  sudo "mv #{application}.conf /etc/monit/conf.d/#{application}.conf"
16
22
  sudo "/etc/init.d/monit restart"
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ PATH=/usr/local/bin:$PATH
3
+ eval "$@"
@@ -3,8 +3,8 @@
3
3
 
4
4
  check process <%= application %>_<%= port %>
5
5
  with pidfile <%= shared_path %>/pids/thin.<%= port %>.pid
6
- start program = "/bin/sh -c 'cd <%= current_path %> && /usr/bin/bundle exec thin start -C /etc/thin/<%= application %>.yml --only <%= i %>'"
7
- stop program = "/bin/sh -c 'cd <%= current_path %> && /usr/bin/bundle exec thin stop -C /etc/thin/<%= application %>.yml --only <%= i %>'"
6
+ start program = "/usr/local/sbin/spawner.sh 'cd <%= current_path %> && /usr/local/bin/bundle exec thin start -C /etc/thin/<%= application %>.yml --only <%= i %>'"
7
+ stop program = "/usr/local/sbin/spawner.sh 'cd <%= current_path %> && /usr/local/bin/bundle exec thin stop -C /etc/thin/<%= application %>.yml --only <%= i %>'"
8
8
  if totalmem > 120.0 MB for 5 cycles then restart
9
9
  if failed port <%= port %> then restart
10
10
  if cpu usage > 95% for 3 cycles then restart
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recipiez
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alastair Brunton
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-10-15 00:00:00 +02:00
18
+ date: 2012-10-24 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -56,6 +56,7 @@ files:
56
56
  - recipes/templates/php_handler.erb
57
57
  - recipes/templates/php_vhost.erb
58
58
  - recipes/templates/recipiez.yml.example
59
+ - recipes/templates/spawner_monit.erb
59
60
  - recipes/templates/sshd_monit.erb
60
61
  - recipes/templates/thin_monit.erb
61
62
  - recipes/templates/upstart.erb