Permalink
Browse files

use webroar as the application server

  • Loading branch information...
donnoman committed Dec 7, 2009
1 parent 141b15f commit 76e0ae350d75127fb43e7cc181f0e3df19dab163
Showing with 49 additions and 19 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 Gemfile
  3. +44 −16 config/deploy.rb
  4. +2 −0 config/secrets.rb.template
  5. +0 −1 vendor/bundler_gems/dirs/deprec
View
@@ -3,6 +3,7 @@ tmp
log
bin
vendor/bundler_gems/gems
vendor/bundler_gems/dirs
vendor/bundler_gems/specifications
vendor/bundler_gems/doc
vendor/bundler_gems/environment.rb
View
@@ -7,9 +7,9 @@ bundle_path "vendor/bundler_gems"
# Sources
clear_sources
source "http://gemcutter.org"
source "http://gems.rubyforge.org/"
source "http://gems.github.com"
# Stack
gem "capistrano", "2.5.9"
gem "deprec", "2.1.4", :git => "git://github.com/donnoman/deprec.git", :branch => "master"
gem "deprec", nil, :git => "git@github.com:donnoman/deprec.git"
gem "ruby-debug"
View
@@ -1,37 +1,43 @@
require 'deprec'
set :application, "flitten"
set :repository, "git@github.com:donnoman/flitten.git"
set :branch, "testing"
set :branch, "master"
set :user, "root"
set :deploy_to, "/app/#{application}"
set :deploy_via, :remote_cache
ssh_options[:forward_agent] = true
set :scm, :git
require 'config/secrets'
set :ruby_vm_type, :mri
set :app_server_type, :webroar
set :web_server_type, :none
set :webroar_import_configuration, false
role :web, "server", :no_release => true # Your HTTP server, Apache/etc
role :app, "server" # This may be the same as your `Web` server
role :db, "server", :primary => true, :no_release => true
require 'config/secrets'
role :web, '', :no_release => true
#role :web, "server.flitten.com", :no_release => true # Your HTTP server, Apache/etc
role :app, "server.flitten.com" # This may be the same as your `Web` server
role :db, "server.flitten.com", :primary => true, :no_release => true
after "deploy:setup" do
#Every Role should have the following:
deprec.ree.install
gem2.update_system #Bundler requires an updated rubygems
gem2.install "bundler", "0.7.0"
deprec.git.install
end
# We hook into start so these task chains are only inserted when the :only task
# has been used on the command line.
on :start, :only => :deploy do
on :start, :only => [:deploy,"deploy:migrations"] do
after "deploy:update_code" do
bundler.dependencies.default
run "cd #{latest_release}; gem bundle"
bundler.bundle
end
end
on :start, :only => ["deploy:setup"] do
top.deprec.rails.install_stack
end
namespace :bundler do
# These dependencies can change as items are added to the bundle
namespace :dependencies do
@@ -40,14 +46,18 @@
flitten_deploy
end
desc "System Dependencies to compile bundled gems for flitten"
task :flitten do
task :flitten, :except => {:no_release => true} do
apt.install({:base => %w(libxml2-dev libxslt-dev libxslt-ruby)}, :stable, :roles => [:app])
end
desc "System Dependencies to compile bundled gems for flitten deploy scripts"
task :flitten_deploy do
task :flitten_deploy, :except => {:no_release => true} do
#none yet
end
end
task :bundle, :except => {:no_release => true} do
run "cd #{latest_release}; gem bundle --cached"
end
end
# Deploy scripts were separated from the app to allow them to be checked out
@@ -81,4 +91,22 @@
#nothing
end
end
end
namespace :deprec do
namespace :rails do
task :install_stack do
top.deprec.ruby.install
top.deprec.git.install
top.deprec.app.install # Uses value of app_server_type
gem2.update_system #Bundler requires an updated rubygems
gem2.install "bundler", "0.7.0"
end
task :activate_services do
top.deprec.app.activate
end
task :setup_database, :roles => :db do
#nothing
end
end
end
@@ -1,4 +1,6 @@
Capistrano::Configuration.instance(:must_exist).load do
set :mysql_admin_user, 'root'
set(:mysql_admin_pass) { Capistrano::CLI.password_prompt "Enter database password for '#{mysql_admin_user}':"}
set :webroar_admin_username, 'admin'
set(:webroar_admin_password) { Capistrano::CLI.password_prompt "Enter admin password for WebROaR '#{webroar_admin_username}' (minimum 6 characters):"}
end
Submodule deprec deleted from 1ead15

0 comments on commit 76e0ae3

Please sign in to comment.