> On Mon, 18 Jan 2010 23:11:07 -0800 (PST), Mario <mflor...@gmail.com> wrote: >> Hi, >> >> I'm working on a RoR website for an non-profit and we want to put the >> code up on github as a public repo (my first public repo). The only >> issue I'm having is that we use an SMTP connection to send email and >> are storing the password in our environments/production.rb file. Are >> there any best practices I should adhere to? Or does anyone have any >> suggestions on how they've handled this issue?
What I've done in the past is have a config/private_config.rb file which defines constants such as your SMTP passwords. Then I add this to .gitignore so that it's not in the repo and have a private_config.example.rb in the repo to document the file. I then create a shared/config dir and place it there along with database.yml etc.. and move it into place on deploy with something like the following (assuming capistrano) before "deploy:symlink", "copy_configs" desc "Copy config files from shared/config/ to current/config/" task :copy_configs, :except => {:no_release => true} do run "cp #{deploy_to}/shared/config/* #{release_path}/config/" end I've then got tasks to mass update the file on all the servers etc... so we don't have to SSH into each box individually to update it. Hope that helps. -- Richard Livsey Minutebase - Online Meeting Minutes http://minutebase.com http://livsey.org
-- You received this message because you are subscribed to the Google Groups "GitHub" group. To post to this group, send email to git...@googlegroups.com. To unsubscribe from this group, send email to github+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/github?hl=en.