On Dec 16, 2010, at 3:58 AM, Fima Leshinsky wrote:
> I'm curious why none of your deploy.rb scripts contained any reference to the 
> database config file. How are you guys deploying migrations?

That's a general concern for all Rails apps, not specific to Radiant. AFAIK 
common practice is still to keep database.yml out of source control and 
maintain a separate copy on each staging or production server. We symlink ours 
from the shared path to the current checkout on each deploy:

    namespace :deploy do
        desc "Symlink necessary files into current dir"
        task :symlink_configs do
            run "ln -sf #{shared_path}/database.yml 
            # copy any other sensitive configs or initializers you might need 
-- S3 keys, etc.
        after 'deploy:update_code', 'deploy:symlink_configs'

How you get database.yml into your shared path is another matter. The blog you 
linked to has a recipe for that as well.

Reply via email to