Skip to content
Snippets Groups Projects
Commit e3d52bb4 authored by ilya's avatar ilya
Browse files

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

parent 76f140aa
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......@@ -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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment