Add db.php.erb template.
Use node attribute for local_settings_file in application resource.
Change default local_settings_file and settings_template.