putting the config file in a shared directory for in the deploy scripts

This commit is contained in:
ilya 2010-09-21 17:39:44 -07:00
parent 76f140aa8b
commit e3d52bb467
3 changed files with 8 additions and 3 deletions

View file

@ -53,6 +53,11 @@ namespace :deploy do
run "ln -s -f #{shared_path}/bundle #{current_path}/vendor/bundle"
end
task :symlink_config do
run "touch #{shared_path}/app_config.yml"
run "ln -s -f #{shared_path}/app_config.yml #{current_path}/config/app_config.yml"
end
task :start do
start_mongo
start_thin
@ -150,4 +155,4 @@ namespace :db do
end
after "deploy:symlink", "deploy:symlink_images", "deploy:symlink_bundle"
after "deploy:symlink", "deploy:symlink_images", "deploy:symlink_bundle", 'deploy:symlink_config"

View file

@ -46,7 +46,7 @@ def set_app_config username
current_config[Rails.env.to_s] ||= {}
current_config[Rails.env.to_s]['pod_url'] = "#{username}.joindiaspora.com"
current_config['default']['pod_url'] = "#{username}.joindiaspora.com"
file = File.new(Rails.root.join('config','app_config.yml'),'w')
file = File.new(Rails.root.join('..','shared','app_config.yml'),'w')
file.write(current_config.to_yaml)
file.close
end

View file

@ -11,7 +11,7 @@ def set_app_config username
current_config[Rails.env.to_s] ||= {}
current_config[Rails.env.to_s]['pod_url'] = "#{username}.joindiaspora.com"
current_config['default']['pod_url'] = "#{username}.joindiaspora.com"
file = File.new(Rails.root.join('config','app_config.yml'),'w')
file = File.new(Rails.root.join('..','shared','app_config.yml'),'w')
file.write(current_config.to_yaml)
file.close
end