simplify initial database setup deployment rules

This commit is contained in:
wvengen 2014-01-15 21:39:29 +01:00
parent af3761fcf5
commit 46b36c42bd
2 changed files with 1 additions and 3 deletions

View file

@ -22,7 +22,7 @@ namespace :deploy do
task :config => ['deploy:set_rails_env'] do
require 'securerandom'
on roles(:app), in: :groups do
db_name = fetch(:unique_app_name).gsub(/[^-_a-z0-9]/i, '')
db_name = (fetch(:db_user) or fetch(:application))
db_passwd = SecureRandom.urlsafe_base64(24).to_s
db_yaml = {
fetch(:rails_env).to_s => {