Skip to content

Commit

Permalink
moved prod database in a dir
Browse files Browse the repository at this point in the history
  • Loading branch information
burnto committed Sep 24, 2009
1 parent c7934f7 commit 39d110c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ test:

production:
adapter: sqlite3
database: db/production.sqlite3
database: db/shared/production.sqlite3
pool: 5
timeout: 5000
24 changes: 23 additions & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
set :scm_verbose, true
set :repository_cache, "git_cache"
set :deploy_via, :remote_cache
set :git_enable_submodules,1


# additional settings
default_run_options[:pty] = true # Forgo errors when deploying from windows
Expand All @@ -38,4 +40,24 @@
end
end

after :deploy, "passenger:restart"
namespace :deploy do

task :symlink_shared do
run "ln -s #{shared_path}/db #{latest_release}/db/shared"
run "ln -s #{shared_path}/system #{release_path}/public/system"
end

desc "Restart Application"
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{current_path}/tmp/restart.txt"
end

[:start, :stop].each do |t|
desc "#{t} task is a no-op with mod_rails"
task t, :roles => :app do ; end
end

end

after 'deploy:finalize_update', 'deploy:symlink_shared'
after :deploy, "passenger:restart"
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
map.resources :pieces
map.resources :members

map.root :controller => "pieces", :action => "index"
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end

0 comments on commit 39d110c

Please sign in to comment.