Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task :setup_production_database_configuration do
- mysql_password = Capistrano::CLI.password_prompt("Production MySQL password: ")
- require 'yaml'
- spec = {
- "development" => {
- "adapter" => "sqlite3",
- "database" => "db/development.sqlite3"
- },
- "test" => {
- "adapter" => "sqlite3",
- "database" => "db/test.sqlite3"
- },
- "production" => {
- "adapter" => "mysql",
- "database" => "vom_production",
- "username" => user,
- "password" => mysql_password,
- "encoding" => "UTF8"
- }
- }
- run "mkdir -p #{shared_path}/config"
- put(spec.to_yaml, "#{shared_path}/config/database.yml")
- end
- after "deploy:setup", :setup_production_database_configuration
Add Comment
Please, Sign In to add comment