Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Import application version 0.99.9

  • Loading branch information...
commit fdfe8951694d3fb3179030e563e1033659b38ad8 1 parent cb5ec4a
@schisamo schisamo authored
View
2  cookbooks/application/metadata.json
@@ -43,5 +43,5 @@
"application::tomcat": "Sets up the deployed Java application with Tomcat as the servlet container",
"application::unicorn": "Sets up the deployed Rails application with Unicorn as the web server"
},
- "version": "0.99.8"
+ "version": "0.99.9"
}
View
2  cookbooks/application/metadata.rb
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Deploys and configures a variety of applications defined from databag 'apps'"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "0.99.8"
+version "0.99.9"
recipe "application", "Loads application databags and selects recipes to use"
recipe "application::django", "Deploys a Django application specified in a data bag with the deploy_revision resource"
recipe "application::gunicorn", "Sets up the deployed Django application with Gunicorn as the web server"
View
1  cookbooks/application/recipes/django.rb
@@ -148,6 +148,7 @@
deploy_to app['deploy_to']
action app['force'][node.app_environment] ? :force_deploy : :deploy
ssh_wrapper "#{app['deploy_to']}/deploy-ssh-wrapper" if app['deploy_key']
+ shallow_clone true
purge_before_symlink([])
create_dirs_before_symlink([])
symlinks({})
View
2  cookbooks/application/recipes/mod_php_apache2.rb
@@ -42,7 +42,7 @@
end
if ::File.exists?(::File.join(app['deploy_to'], "current"))
- d = resources(:deploy => app['id'])
+ d = resources(:deploy_revision => app['id'])
d.restart_command do
service "apache2" do action :restart; end
end
View
8 cookbooks/application/recipes/passenger_apache2.rb
@@ -40,9 +40,11 @@
rails_env node.app_environment
end
-d = resources(:deploy_revision => app['id'])
-d.restart_command do
- service "apache2" do action :restart; end
+if ::File.exists?(::File.join(app['deploy_to'], "current"))
+ d = resources(:deploy_revision => app['id'])
+ d.restart_command do
+ service "apache2" do action :restart; end
+ end
end
apache_site "000-default" do
View
2  cookbooks/application/recipes/php.rb
@@ -134,7 +134,7 @@
deploy_to app['deploy_to']
action app['force'][node.app_environment] ? :force_deploy : :deploy
ssh_wrapper "#{app['deploy_to']}/deploy-ssh-wrapper" if app['deploy_key']
-
+ shallow_clone true
purge_before_symlink([])
create_dirs_before_symlink([])
symlinks({})
View
2  cookbooks/application/recipes/rails.rb
@@ -169,7 +169,7 @@
environment 'RAILS_ENV' => node.app_environment
action app['force'][node.app_environment] ? :force_deploy : :deploy
ssh_wrapper "#{app['deploy_to']}/deploy-ssh-wrapper" if app['deploy_key']
-
+ shallow_clone true
before_migrate do
if app['gems'].has_key?('bundler')
link "#{release_path}/vendor/bundle" do
View
5 cookbooks/application/recipes/unicorn.rb
@@ -41,7 +41,10 @@
runit_service app['id'] do
template_name 'unicorn'
cookbook 'application'
- options(:app => app)
+ options(
+ :app => app,
+ :smells_like_rack => ::File.exists?(::File.join(app['deploy_to'], "current", "config.ru"))
+ )
run_restart false
end
View
2  cookbooks/application/templates/default/sv-unicorn-run.erb
@@ -3,5 +3,5 @@
cd <%= @options[:app]['deploy_to'] %>/current
exec 2>&1
-exec chpst -u <%= @options[:app]["owner"] %>:<%= @options[:app]["group"] %> unicorn -E <%= node[:app_environment] %> -c /etc/unicorn/<%= @options[:app]['id'] %>.rb
+exec chpst -u <%= @options[:app]["owner"] %>:<%= @options[:app]["group"] %> <%= @options[:smells_like_rack] ? 'unicorn' : 'unicorn_rails' %> -E <%= node[:app_environment] %> -c /etc/unicorn/<%= @options[:app]['id'] %>.rb
Please sign in to comment.
Something went wrong with that request. Please try again.