Skip to content

Commit

Permalink
Overhaul the install.rb file to be a little more succinct due to the …
Browse files Browse the repository at this point in the history
…inclusion of the nginx web server. Added notes to explain installation of each web server. Updated dependency for sprinkle 0.2.3.
  • Loading branch information
benschwarz committed Apr 17, 2009
1 parent db0c300 commit cbc3554
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions config/install.rb
@@ -1,22 +1,29 @@
# Require our stack $:<< File.join(File.dirname(__FILE__), 'stack')
%w(essential apache scm ruby_enterprise memcached postgresql mysql).each do |r|
require File.join(File.dirname(__FILE__), 'stack', r) # ===============
end # = Web servers =
# ===============

# Apache and Nginx are interchangable simply by choosing which file should be included to the stack

# Apache has some extra installers for etags, gzip/deflate compression and expires headers.
# These are enabled by default when you choose Apache, you can remove these dependencies within
# stack/apache.rb

require 'apache'
# require 'nginx'

# Require the rest of our stack
%w(essential scm ruby_enterprise memcached postgresql mysql).each(&method(:require))


# What we're installing to your server # What we're installing to your server
# Take what you want, leave what you don't # Take what you want, leave what you don't
# Build up your own and strip down your server until you get it right. # Build up your own and strip down your server until you get it right.
policy :passenger_stack, :roles => :app do policy :stack, :roles => :app do
requires :webserver # Apache requires :webserver # Apache or Nginx

requires :apache_etag_support # == Apache extras
requires :apache_deflate_support # Read about these specialties in
requires :apache_expires_support # stack/apache.rb

requires :appserver # Passenger requires :appserver # Passenger
requires :ruby_enterprise # Ruby Enterprise edition requires :ruby_enterprise # Ruby Enterprise edition
requires :database # MySQL or Postgres requires :database # MySQL or Postgres, also installs rubygems for each
requires :ruby_database_driver # mysql or postgres gems
requires :scm # Git requires :scm # Git
requires :memcached # Memcached requires :memcached # Memcached
requires :libmemcached # Libmemcached requires :libmemcached # Libmemcached
Expand All @@ -42,8 +49,8 @@


# Depend on a specific version of sprinkle # Depend on a specific version of sprinkle
begin begin
gem 'sprinkle', ">= 0.2.1" gem 'sprinkle', ">= 0.2.3"
rescue Gem::LoadError rescue Gem::LoadError
puts "sprinkle 0.2.1 required.\n Run: `sudo gem install sprinkle`" puts "sprinkle 0.2.3 required.\n Run: `sudo gem install sprinkle`"
exit exit
end end

0 comments on commit cbc3554

Please sign in to comment.