fdlcap 0.3.28
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.
- data/LICENSE +20 -0
- data/README.rdoc +72 -0
- data/Rakefile +69 -0
- data/VERSION +1 -0
- data/bin/fdlcap +4 -0
- data/examples/deploy.rb +57 -0
- data/fdlcap.gemspec +98 -0
- data/features/fdlcap.feature +9 -0
- data/features/step_definitions/fdlcap_steps.rb +0 -0
- data/features/support/env.rb +6 -0
- data/lib/fdlcap/extensions/configuration.rb +34 -0
- data/lib/fdlcap/extensions/recipe_definition.rb +19 -0
- data/lib/fdlcap/recipes/autotagger.rb +51 -0
- data/lib/fdlcap/recipes/check_revision.rb +22 -0
- data/lib/fdlcap/recipes/craken.rb +5 -0
- data/lib/fdlcap/recipes/database.rb +204 -0
- data/lib/fdlcap/recipes/delayed_job.rb +28 -0
- data/lib/fdlcap/recipes/deploy.rb +26 -0
- data/lib/fdlcap/recipes/fdl_defaults.rb +16 -0
- data/lib/fdlcap/recipes/geminstaller.rb +53 -0
- data/lib/fdlcap/recipes/newrelic.rb +6 -0
- data/lib/fdlcap/recipes/nginx.rb +102 -0
- data/lib/fdlcap/recipes/passenger.rb +17 -0
- data/lib/fdlcap/recipes/performance.rb +78 -0
- data/lib/fdlcap/recipes/rake.rb +19 -0
- data/lib/fdlcap/recipes/rolling_restart.rb +31 -0
- data/lib/fdlcap/recipes/rsync.rb +42 -0
- data/lib/fdlcap/recipes/ruby_inline.rb +19 -0
- data/lib/fdlcap/recipes/sass.rb +20 -0
- data/lib/fdlcap/recipes/sinatra_passenger.rb +21 -0
- data/lib/fdlcap/recipes/slice.rb +59 -0
- data/lib/fdlcap/recipes/ssh.rb +42 -0
- data/lib/fdlcap/recipes/stages.rb +12 -0
- data/lib/fdlcap/recipes/symlink_configs.rb +7 -0
- data/lib/fdlcap/recipes/symlinks.rb +48 -0
- data/lib/fdlcap/recipes/thin.rb +119 -0
- data/lib/fdlcap/recipes/thinking_sphinx.rb +12 -0
- data/lib/fdlcap/recipes.rb +11 -0
- data/lib/fdlcap/templates/nginx.auth.conf.erb +9 -0
- data/lib/fdlcap/templates/nginx.conf.erb +57 -0
- data/lib/fdlcap/templates/nginx.vhost.conf.erb +85 -0
- data/lib/fdlcap.rb +3 -0
- data/test/fdlcap_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- metadata +140 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
define_recipe :sinatra_passenger do
|
3
|
+
use_recipe :passenger
|
4
|
+
|
5
|
+
namespace :sinatra_passenger do
|
6
|
+
desc "Set file permissions"
|
7
|
+
task :chmod_directories_config do
|
8
|
+
run "cd #{release_path} && find -maxdepth 1 -type d -exec chmod 755 {} \\;"
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Set public folder permissions"
|
12
|
+
task :chmod_directories_public do
|
13
|
+
run "cd #{release_path}/public && find -type d -exec chmod 755 {} \\;"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
after "deploy:update_code", "sinatra_passenger:chmod_directories_config"
|
18
|
+
after "deploy:update_code", "sinatra_passenger:chmod_directories_public"
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
|
3
|
+
namespace :slice do
|
4
|
+
|
5
|
+
desc "Tail the Rails log for this environment"
|
6
|
+
task :tail_logs, :roles => :app do
|
7
|
+
run "tail -f #{shared_path}/log/#{rails_env}.log" do |channel, stream, data|
|
8
|
+
puts # for an extra line break before the host name
|
9
|
+
puts "#{channel[:server]} -> #{data}"
|
10
|
+
break if stream == :err
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "Tail the system log for this environment"
|
15
|
+
task :tail_syslog, :roles => :app do
|
16
|
+
sudo "tail -f /var/log/syslog" do |channel, stream, data|
|
17
|
+
puts # for an extra line break before the host name
|
18
|
+
puts "#{channel[:server]} -> #{data}"
|
19
|
+
break if stream == :err
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "Tail the message log for this environment"
|
24
|
+
task :tail_messages, :roles => :app do
|
25
|
+
sudo "tail -f /var/log/messages" do |channel, stream, data|
|
26
|
+
puts # for an extra line break before the host name
|
27
|
+
puts "#{channel[:server]} -> #{data}"
|
28
|
+
break if stream == :err
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
desc <<-DESC
|
33
|
+
grep the production.log to find long running queries
|
34
|
+
DESC
|
35
|
+
task :grep_requests, :roles => :app do
|
36
|
+
run "grep 'Completed in [0-9]*' #{shared_path}/log/#{rails_env}.log"
|
37
|
+
end
|
38
|
+
|
39
|
+
desc <<-DESC
|
40
|
+
grep the production.log to find long running queries
|
41
|
+
DESC
|
42
|
+
task :grep_long_requests, :roles => :app do
|
43
|
+
run "grep 'Completed in [0-9][0-9]' #{shared_path}/log/#{rails_env}.log"
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
# Deploy the custom maintenance page
|
49
|
+
define_recipe :custom_maintenance_page do
|
50
|
+
|
51
|
+
desc "Copy the maintenance page from the public directory to the shared directory"
|
52
|
+
task :copy_maintenance_page, :roles => :app do
|
53
|
+
upload "public/maintenance.html","#{shared_path}/system/maintenance.html.custom", :via => :scp
|
54
|
+
end
|
55
|
+
|
56
|
+
before "deploy:web:disable", "slice:copy_maintenance_page"
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
task :ssh do
|
3
|
+
role = (ENV['ROLE'] || :app).to_sym
|
4
|
+
servers = find_servers :roles => role
|
5
|
+
server = servers.first
|
6
|
+
ssh_cmd = fetch(:ssh_cmd, '/usr/bin/ssh')
|
7
|
+
if server
|
8
|
+
`echo '#{password}' | /usr/bin/pbcopy`
|
9
|
+
exec "#{ssh_cmd} #{user}@#{server.host} -p #{server.port || 22} "
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
task :ssh_forever do
|
14
|
+
ssh_forever_binary = '/usr/bin/ssh-forever'
|
15
|
+
if File.exists?(ssh_forever_binary)
|
16
|
+
set :ssh_cmd, ssh_forever_binary
|
17
|
+
ssh
|
18
|
+
else
|
19
|
+
puts "#{ssh_forever_binary} not found - do you have the ssh-forever gem installed?"
|
20
|
+
exit 1
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
#namespace :ssh do
|
25
|
+
task :tunnel do
|
26
|
+
remote_port = ENV['REMOTE_PORT'] || 80
|
27
|
+
local_port = ENV['LOCAL_PORT'] || 2000
|
28
|
+
role = (ENV['ROLE'] || :app).to_sym
|
29
|
+
|
30
|
+
servers = find_servers :roles => role
|
31
|
+
server = servers.first
|
32
|
+
if server
|
33
|
+
puts "Opening a tunnel from port #{local_port} locally to port #{remote_port} on #{server.host}"
|
34
|
+
Net::SSH.start(server.host, user, :password => password, :port => server.port) do |ssh|
|
35
|
+
ssh.forward.local(local_port, "127.0.0.1", remote_port)
|
36
|
+
ssh.loop { true }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
#end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
define_recipe :stages do |*stages|
|
3
|
+
|
4
|
+
set :stages, stages.flatten unless exists?(:stages) && !stages.empty?
|
5
|
+
|
6
|
+
unless exists?(:default_stage)
|
7
|
+
set :default_stage, :staging
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'capistrano/ext/multistage'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
|
3
|
+
define_recipe :symlinks do
|
4
|
+
#
|
5
|
+
# Callbacks
|
6
|
+
#
|
7
|
+
after "deploy:update_code", "symlinks:create"
|
8
|
+
|
9
|
+
#
|
10
|
+
# Configuration
|
11
|
+
#
|
12
|
+
set :symlink_dirs, []
|
13
|
+
set :symlink_absolute_dirs, []
|
14
|
+
|
15
|
+
#
|
16
|
+
# Tasks
|
17
|
+
#
|
18
|
+
namespace :symlinks do
|
19
|
+
|
20
|
+
desc "fix symlinks to shared directory"
|
21
|
+
task :fix, :roles => :app, :except => { :no_release => true } do
|
22
|
+
# for folders stored under public
|
23
|
+
symlink_dirs.each do |share|
|
24
|
+
run "rm -rf #{current_path}/#{share}"
|
25
|
+
run "mkdir -p #{shared_path}/#{share}"
|
26
|
+
run "ln -nfs #{shared_path}/#{share} #{current_path}/#{share}"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
desc "create symlinks to shared directory"
|
31
|
+
task :create, :roles => :app, :except => { :no_release => true } do
|
32
|
+
# for folders stored under public
|
33
|
+
symlink_dirs.each do |share|
|
34
|
+
run "rm -rf #{release_path}/#{share}"
|
35
|
+
run "mkdir -p #{shared_path}/#{share}"
|
36
|
+
run "ln -nfs #{shared_path}/#{share} #{release_path}/#{share}"
|
37
|
+
end
|
38
|
+
|
39
|
+
symlink_absolute_dirs.each do |share|
|
40
|
+
run "rm -rf #{share[:symlink]}"
|
41
|
+
run "mkdir -p #{share[:source]}"
|
42
|
+
run "ln -nfs #{share[:source]} #{share[:symlink]}"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
|
3
|
+
define_recipe :thin do
|
4
|
+
|
5
|
+
set :thin_servers, 2
|
6
|
+
set :thin_port, 8000
|
7
|
+
set :thin_address, "127.0.0.1"
|
8
|
+
set :thin_environment, "production"
|
9
|
+
set :thin_conf, nil
|
10
|
+
set :thin_user, nil
|
11
|
+
set :thin_group, nil
|
12
|
+
set :thin_prefix, nil
|
13
|
+
set :thin_pid_file, nil
|
14
|
+
set :thin_log_file, nil
|
15
|
+
set :thin_config_script, nil
|
16
|
+
|
17
|
+
namespace :thin do
|
18
|
+
desc <<-DESC
|
19
|
+
Install Thin script on the app server. This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is
|
20
|
+
set to true.
|
21
|
+
DESC
|
22
|
+
task :install , :roles => :app do
|
23
|
+
send(run_method, "gem install thin")
|
24
|
+
send(run_method, "thin install")
|
25
|
+
end
|
26
|
+
|
27
|
+
desc <<-DESC
|
28
|
+
Configure thin processes on the app server. This uses the :use_sudo
|
29
|
+
variable to determine whether to use sudo or not. By default, :use_sudo is
|
30
|
+
set to true.
|
31
|
+
DESC
|
32
|
+
task :configure, :roles => :app do
|
33
|
+
set_conf
|
34
|
+
|
35
|
+
argv = []
|
36
|
+
argv << "thin"
|
37
|
+
argv << "-s #{thin_servers.to_s}"
|
38
|
+
argv << "-p #{thin_port.to_s}"
|
39
|
+
argv << "-e #{thin_environment}"
|
40
|
+
argv << "-a #{thin_address}"
|
41
|
+
argv << "-c #{current_path}"
|
42
|
+
argv << "-C #{thin_conf}"
|
43
|
+
argv << "-P #{thin_pid_file}" if thin_pid_file
|
44
|
+
argv << "-l #{thin_log_file}" if thin_log_file
|
45
|
+
argv << "--user #{thin_user}" if thin_user
|
46
|
+
argv << "--group #{thin_group}" if thin_group
|
47
|
+
argv << "--prefix #{thin_prefix}" if thin_prefix
|
48
|
+
argv << "config"
|
49
|
+
cmd = argv.join " "
|
50
|
+
send(run_method, cmd)
|
51
|
+
end
|
52
|
+
|
53
|
+
task :setup, :roles => :app do
|
54
|
+
thin.install
|
55
|
+
thin.configure
|
56
|
+
end
|
57
|
+
|
58
|
+
desc <<-DESC
|
59
|
+
Start Thin processes on the app server. This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is
|
60
|
+
set to true.
|
61
|
+
DESC
|
62
|
+
task :start , :roles => :app do
|
63
|
+
set_conf
|
64
|
+
cmd = "thin start -C #{thin_conf}"
|
65
|
+
send(run_method, cmd)
|
66
|
+
end
|
67
|
+
|
68
|
+
desc <<-DESC
|
69
|
+
Restart the Thin processes on the app server by starting and stopping the cluster. This uses the :use_sudo
|
70
|
+
variable to determine whether to use sudo or not. By default, :use_sudo is set to true.
|
71
|
+
DESC
|
72
|
+
task :restart , :roles => :app do
|
73
|
+
set_conf
|
74
|
+
cmd = "thin restart -C #{thin_conf}"
|
75
|
+
send(run_method, cmd)
|
76
|
+
end
|
77
|
+
|
78
|
+
desc <<-DESC
|
79
|
+
Stop the Thin processes on the app server. This uses the :use_sudo
|
80
|
+
variable to determine whether to use sudo or not. By default, :use_sudo is
|
81
|
+
set to true.
|
82
|
+
DESC
|
83
|
+
task :stop , :roles => :app do
|
84
|
+
set_conf
|
85
|
+
cmd = "thin stop -C #{thin_conf}"
|
86
|
+
send(run_method, cmd)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def set_conf
|
91
|
+
set :thin_conf, "/etc/thin/#{application}.yml" unless thin_conf
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
namespace :deploy do
|
96
|
+
desc <<-DESC
|
97
|
+
Restart the Thin processes on the app server by calling thin:restart.
|
98
|
+
DESC
|
99
|
+
task :restart, :roles => :app do
|
100
|
+
thin.restart
|
101
|
+
end
|
102
|
+
|
103
|
+
desc <<-DESC
|
104
|
+
Start the Thin processes on the app server by calling thin:start.
|
105
|
+
DESC
|
106
|
+
task :start, :roles => :app do
|
107
|
+
thin.start
|
108
|
+
end
|
109
|
+
|
110
|
+
desc <<-DESC
|
111
|
+
Stop the Thin processes on the app server by calling thin:stop.
|
112
|
+
DESC
|
113
|
+
task :stop, :roles => :app do
|
114
|
+
thin.stop
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
# These recipies assume an engineyard configuration
|
3
|
+
|
4
|
+
# searchd assumes indexing and configuring being called directly on searchd
|
5
|
+
define_recipe :thinking_sphinx do
|
6
|
+
after "deploy:symlink_configs", "thinking_sphinx:symlink"
|
7
|
+
after "thinking_sphinx:symlink", "sphinx:configure"
|
8
|
+
after "deploy:update", "deploy:migrate"
|
9
|
+
after "deploy:migrate", "sphinx:reindex"
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Pull in cap extensions
|
2
|
+
require 'fdlcap/extensions/configuration'
|
3
|
+
require 'fdlcap/extensions/recipe_definition'
|
4
|
+
|
5
|
+
# Load external fdlcap dependencies
|
6
|
+
require 'eycap/recipes'
|
7
|
+
|
8
|
+
# Load up custom recipe chunks
|
9
|
+
Dir.glob(File.join(File.dirname(__FILE__),'recipes','*.rb')).each do |file|
|
10
|
+
require file
|
11
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# taken mostly from "The Rails Way" page 663
|
2
|
+
|
3
|
+
# user and group to run as
|
4
|
+
user <%= nginx_user %>;
|
5
|
+
# number of nginx workers
|
6
|
+
worker_processes <%= nginx_processes %>;
|
7
|
+
# pid of nginx master process
|
8
|
+
pid /var/run/nginx.pid;
|
9
|
+
|
10
|
+
error_log /var/log/nginx/default.error.log debug;
|
11
|
+
#error_log /var/log/nginx/error.log notice;
|
12
|
+
#error_log /var/log/nginx/error.log info;
|
13
|
+
|
14
|
+
# number of worker connections. 1024 is a good default
|
15
|
+
events {
|
16
|
+
worker_connections 1024;
|
17
|
+
use epoll; # linux only!
|
18
|
+
}
|
19
|
+
|
20
|
+
|
21
|
+
http {
|
22
|
+
# pull in mime-types. You can break out your config
|
23
|
+
# into as many include's as you want.
|
24
|
+
include /etc/nginx/mime.types;
|
25
|
+
# set a default type for the rare situation that nothing matches.
|
26
|
+
default_type application/octet-stream;
|
27
|
+
# configure log format
|
28
|
+
log_format main '$remote_addr - $remote_user [$time_local] $request '
|
29
|
+
'"$status" $body_bytes_sent "$http_referer" '
|
30
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
31
|
+
|
32
|
+
# no sendfile on OS X
|
33
|
+
sendfile on;
|
34
|
+
tcp_nopush on;
|
35
|
+
tcp_nodelay on;
|
36
|
+
|
37
|
+
#keepalive_timeout 0;
|
38
|
+
keepalive_timeout 65;
|
39
|
+
|
40
|
+
<% if nginx_gzip_on %>
|
41
|
+
gzip on;
|
42
|
+
gzip_http_version 1.0;
|
43
|
+
gzip_comp_level 2;
|
44
|
+
gzip_proxied any;
|
45
|
+
|
46
|
+
<% if nginx_gzip_xml_on %>
|
47
|
+
# IE 6 doesn't pass compressed xml to flash. So if no flash xml consumption on site can add
|
48
|
+
# text/xml application/xml application/xml+rss
|
49
|
+
<% end %>
|
50
|
+
gzip_types text/plain text/html text/css application/x-javascript text/javascript;
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
access_log /var/log/nginx/nginx.default.access.log main;
|
54
|
+
error_log /var/log/nginx/nginx.default.error.log info;
|
55
|
+
|
56
|
+
include /etc/nginx/vhosts/*.conf;
|
57
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# location of mongrel servers to proxy too
|
2
|
+
upstream mongrel_<%= application.gsub('.', '_') %> {
|
3
|
+
<% mongrel_port.upto(mongrel_port + mongrel_servers) do |port| %>
|
4
|
+
server 127.0.0.1:<%= port %>;
|
5
|
+
<% end %>
|
6
|
+
}
|
7
|
+
|
8
|
+
server {
|
9
|
+
# port to listen on. Can also be set to an IP:PORT
|
10
|
+
listen 80 <%= "default" if nginx_default_app %>;
|
11
|
+
# set max size for file uploads to 50mb
|
12
|
+
client_max_body_size 50M;
|
13
|
+
# sets the domain[s] that this vhost server requests for
|
14
|
+
# if two apps are on this box remove the ip and setup your hosts file
|
15
|
+
server_name <%= nginx_server_names %>;
|
16
|
+
# doc root
|
17
|
+
root <%= current_path %>/public;
|
18
|
+
# vhost specific logs
|
19
|
+
access_log <%= shared_path %>/log/<%= application %>.access.log main;
|
20
|
+
error_log <%= shared_path %>/log/<%= application %>.error.log notice;
|
21
|
+
|
22
|
+
# this rewrites all the requests to the maintenance.thml page if it exists in the doc root.
|
23
|
+
# this is for capistrano's disable web task
|
24
|
+
if (-f $document_root/system/maintenance.html) {
|
25
|
+
rewrite ^(.*)$ /system/maintenance.html last;
|
26
|
+
break;
|
27
|
+
}
|
28
|
+
# block access to paths containing .svn
|
29
|
+
location ~* ^.*\.svn.*$ {
|
30
|
+
internal;
|
31
|
+
}
|
32
|
+
|
33
|
+
location / {
|
34
|
+
|
35
|
+
<%= "include /etc/nginx/vhosts/#{application}.auth.conf" if nginx_http_auth_app %>
|
36
|
+
|
37
|
+
index index.html index.htm;
|
38
|
+
# forward the user's IP address to Rails
|
39
|
+
proxy_set_header X-Real-IP $remote_addr;
|
40
|
+
# needed for HTTPS must add an additional server block to configure it.
|
41
|
+
# see "The Rails Way" page 665 for more info
|
42
|
+
proxy_set_header X-FORWARD_PROTO https;
|
43
|
+
# Forward information about the client and host
|
44
|
+
# Otherwise our Rails app wouldn't have access to it
|
45
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
46
|
+
proxy_set_header Host $http_host;
|
47
|
+
proxy_redirect false;
|
48
|
+
proxy_max_temp_file_size 0;
|
49
|
+
|
50
|
+
# use this as a reference for a full production deployment
|
51
|
+
# do not use on a dev box. this adds far futures expires.
|
52
|
+
<%= "#" if nginx_far_future %> location ~ ^/(images|javascripts|stylesheets)/ {
|
53
|
+
<%= "#" if nginx_far_future %> expires 10y;
|
54
|
+
<%= "#" if nginx_far_future %> }
|
55
|
+
|
56
|
+
# if file exists break execution and serve up file for example files in images, javascripts, and stylesheets
|
57
|
+
if (-f $request_filename) {
|
58
|
+
break;
|
59
|
+
}
|
60
|
+
# Rails page caching, if file path plus index.html exists break execution and serve up file
|
61
|
+
if (-f $request_filename/index.html) {
|
62
|
+
rewrite (.*) $1/index.html break;
|
63
|
+
}
|
64
|
+
# Rails page caching, if file.html exists break execution and serve up file
|
65
|
+
if (-f $request_filename.html) {
|
66
|
+
rewrite (.*) $1.html break;
|
67
|
+
}
|
68
|
+
# if file does not exist forward to mongrel
|
69
|
+
if (!-f $request_filename) {
|
70
|
+
proxy_pass http://mongrel_<%= application.gsub('.', '_') %>;
|
71
|
+
break;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
<% for location in nginx_auth_locations %>
|
75
|
+
location <%= location %> {
|
76
|
+
<%= "include /etc/nginx/vhosts/#{application}.auth.conf" %>
|
77
|
+
}
|
78
|
+
<% end %>
|
79
|
+
# must be an error so point to error page.
|
80
|
+
error_page 500 502 503 504 /500.html;
|
81
|
+
location = /500.html {
|
82
|
+
root <%= current_path %>/public;
|
83
|
+
}
|
84
|
+
|
85
|
+
}
|
data/lib/fdlcap.rb
ADDED
data/test/fdlcap_test.rb
ADDED
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fdlcap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.28
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Factory Design Labs
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-10-08 00:00:00 -06:00
|
13
|
+
default_executable: fdlcap
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: engineyard-eycap
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.4.7
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: zilkey-auto_tagger
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.0.9
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: capistrano
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 2.5.5
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: capistrano-ext
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.2.1
|
54
|
+
version:
|
55
|
+
description:
|
56
|
+
email: interactive@factorylabs.com
|
57
|
+
executables:
|
58
|
+
- fdlcap
|
59
|
+
extensions: []
|
60
|
+
|
61
|
+
extra_rdoc_files:
|
62
|
+
- LICENSE
|
63
|
+
- README.rdoc
|
64
|
+
files:
|
65
|
+
- LICENSE
|
66
|
+
- README.rdoc
|
67
|
+
- Rakefile
|
68
|
+
- VERSION
|
69
|
+
- bin/fdlcap
|
70
|
+
- examples/deploy.rb
|
71
|
+
- fdlcap.gemspec
|
72
|
+
- features/fdlcap.feature
|
73
|
+
- features/step_definitions/fdlcap_steps.rb
|
74
|
+
- features/support/env.rb
|
75
|
+
- lib/fdlcap.rb
|
76
|
+
- lib/fdlcap/extensions/configuration.rb
|
77
|
+
- lib/fdlcap/extensions/recipe_definition.rb
|
78
|
+
- lib/fdlcap/recipes.rb
|
79
|
+
- lib/fdlcap/recipes/autotagger.rb
|
80
|
+
- lib/fdlcap/recipes/check_revision.rb
|
81
|
+
- lib/fdlcap/recipes/craken.rb
|
82
|
+
- lib/fdlcap/recipes/database.rb
|
83
|
+
- lib/fdlcap/recipes/delayed_job.rb
|
84
|
+
- lib/fdlcap/recipes/deploy.rb
|
85
|
+
- lib/fdlcap/recipes/fdl_defaults.rb
|
86
|
+
- lib/fdlcap/recipes/geminstaller.rb
|
87
|
+
- lib/fdlcap/recipes/newrelic.rb
|
88
|
+
- lib/fdlcap/recipes/nginx.rb
|
89
|
+
- lib/fdlcap/recipes/passenger.rb
|
90
|
+
- lib/fdlcap/recipes/performance.rb
|
91
|
+
- lib/fdlcap/recipes/rake.rb
|
92
|
+
- lib/fdlcap/recipes/rolling_restart.rb
|
93
|
+
- lib/fdlcap/recipes/rsync.rb
|
94
|
+
- lib/fdlcap/recipes/ruby_inline.rb
|
95
|
+
- lib/fdlcap/recipes/sass.rb
|
96
|
+
- lib/fdlcap/recipes/sinatra_passenger.rb
|
97
|
+
- lib/fdlcap/recipes/slice.rb
|
98
|
+
- lib/fdlcap/recipes/ssh.rb
|
99
|
+
- lib/fdlcap/recipes/stages.rb
|
100
|
+
- lib/fdlcap/recipes/symlink_configs.rb
|
101
|
+
- lib/fdlcap/recipes/symlinks.rb
|
102
|
+
- lib/fdlcap/recipes/thin.rb
|
103
|
+
- lib/fdlcap/recipes/thinking_sphinx.rb
|
104
|
+
- lib/fdlcap/templates/nginx.auth.conf.erb
|
105
|
+
- lib/fdlcap/templates/nginx.conf.erb
|
106
|
+
- lib/fdlcap/templates/nginx.vhost.conf.erb
|
107
|
+
- test/fdlcap_test.rb
|
108
|
+
- test/test_helper.rb
|
109
|
+
has_rdoc: true
|
110
|
+
homepage: http://github.com/factorylabs/fdlcap
|
111
|
+
licenses: []
|
112
|
+
|
113
|
+
post_install_message:
|
114
|
+
rdoc_options:
|
115
|
+
- --charset=UTF-8
|
116
|
+
require_paths:
|
117
|
+
- lib
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: "0"
|
123
|
+
version:
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: "0"
|
129
|
+
version:
|
130
|
+
requirements: []
|
131
|
+
|
132
|
+
rubyforge_project:
|
133
|
+
rubygems_version: 1.3.5
|
134
|
+
signing_key:
|
135
|
+
specification_version: 3
|
136
|
+
summary: a set of capistrano recipies we use regularly at Factory Design Labs
|
137
|
+
test_files:
|
138
|
+
- test/fdlcap_test.rb
|
139
|
+
- test/test_helper.rb
|
140
|
+
- examples/deploy.rb
|