From 52cfa9f676e9ee28a5159ca4d07a7091fe0b6b88 Mon Sep 17 00:00:00 2001 From: Skud Date: Sun, 16 Nov 2014 10:16:34 +1100 Subject: [PATCH 1/2] Changed staging environment hostname to staging.growstuff.org --- config/environments/staging.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 3c9e83e98..6e00f6327 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -67,7 +67,7 @@ Growstuff::Application.configure do # Growstuff configuration config.new_crops_request_link = "http://example.com/not-a-real-url" - config.action_mailer.default_url_options = { :host => 'dev.growstuff.org' } + config.action_mailer.default_url_options = { :host => 'staging.growstuff.org' } config.action_mailer.smtp_settings = { :port => '587', @@ -79,7 +79,7 @@ Growstuff::Application.configure do } config.action_mailer.delivery_method = :smtp - config.host = 'dev.growstuff.org' + config.host = 'staging.growstuff.org' config.analytics_code = '' # this config variable cannot be put in application.yml as it is needed From 93e468876dd4fbdad8b226d322bb16e310980652 Mon Sep 17 00:00:00 2001 From: Skud Date: Sun, 16 Nov 2014 10:17:22 +1100 Subject: [PATCH 2/2] Remove old capistrano stuff, as we don't use it anymore --- config/deploy.rb | 77 ---------------------------------------- config/deploy/staging.rb | 0 2 files changed, 77 deletions(-) delete mode 100644 config/deploy.rb delete mode 100644 config/deploy/staging.rb diff --git a/config/deploy.rb b/config/deploy.rb deleted file mode 100644 index 71dc815d2..000000000 --- a/config/deploy.rb +++ /dev/null @@ -1,77 +0,0 @@ -set :application, "dev.growstuff.org" -set :repository, "https://github.com/Growstuff/growstuff.git" - -set :scm, :git -set :branch, "dev" -set :user, "deploy" -set :use_sudo, false -set :deploy_via, :remote_cache - -set :stages, %w(staging production) -set :default_stage, "staging" -require 'capistrano/ext/multistage' - -# for now we only deploy to staging. -# when we really deploy to production, we should break this out into two -# files under /config/deploy/staging.rb and production.rb -set :deploy_to, "/var/www/#{application}" -set :rails_env, "staging" - -role :web, application -role :app, application -role :db, application, :primary => true # This is where Rails migrations will rue - -require "rvm/capistrano" -set :rvm_ruby_string, 'ruby-1.9.3-p194@growstuffdev' -set :rvm_type, :user - -# if you want to clean up old releases on each deploy uncomment this: -# after "deploy:restart", "deploy:cleanup" - -# if you're still using the script/reaper helper you will need -# these http://github.com/rails/irs_process_scripts - -set :bundle_dir, "/home/deploy/.rvm/gems/ruby-1.9.3-p194@growstuffdev/" -set :bundle_flags, "--deployment" -require 'bundler/capistrano' - -# this makes it easier to run rake tasks on the server. -# just "bundle exec cap rake_task" where rake_task is eg. db:migrate - -require 'cape' - -Cape do - # Create Capistrano recipes for all Rake tasks. - mirror_rake_tasks :db - mirror_rake_tasks 'db:create:all', :roles => :app do |env| - env['RAILS_ENV'] = rails_env - end - mirror_rake_tasks 'db:migrate', :roles => :app do |env| - env['RAILS_ENV'] = rails_env - end - mirror_rake_tasks :assets -end - -namespace :deploy do - task :start do ; end - task :stop do ; end - - desc "Tell Passenger to restart the app." - task :restart, :roles => :app, :except => { :no_release => true } do - run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" - end - - # We keep a partial database.yml (with no production passwords) in git. - # This replaces it with one that has all the right credentials. - - desc "Symlink shared configs and folders on each release." - task :symlink_shared do - run "rm #{release_path}/config/database.yml" - run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml" - end -end - -after :deploy, 'db:migrate' - -after 'deploy:update_code', 'deploy:symlink_shared' -after 'deploy:finalize_update', 'assets:precompile' diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb deleted file mode 100644 index e69de29bb..000000000