From 86f1e0cd9a512b8d93ccc1d5fa83981d43d847d8 Mon Sep 17 00:00:00 2001 From: mimani Date: Mon, 13 Mar 2017 20:28:10 +0530 Subject: [PATCH] added DB config --- Rakefile | 2 +- config/database.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 config/database.yml diff --git a/Rakefile b/Rakefile index 9fdeefb..ba6b733 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,4 @@ -README.rdoc# Add your own tasks in files placed in lib/tasks ending in .rake, +# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 0000000..91138ff --- /dev/null +++ b/config/database.yml @@ -0,0 +1,34 @@ +default: &default + adapter: 'mysql2' + username: 'root' + host: localhost + pool: 5 + timeout: 5000 + +development: + <<: *default + database: backend_dev + +test: + <<: *default + database: backend_test + +staging: + adapter: 'mysql2' + database: <%= ENV['BACKEND_DB'] %> + username: <%= ENV['BACKEND_DB_USER'] %> + password: <%= ENV['BACKEND_DB_PASSWORD'] %> + host: <%= ENV['BACKEND_DB_HOST'] %> + pool: 5 + timeout: 5000 + reconnect: true + +production: + adapter: 'mysql2' + database: <%= ENV['BACKEND_DB'] %> + username: <%= ENV['BACKEND_DB_USER'] %> + password: <%= ENV['BACKEND_DB_PASSWORD'] %> + host: <%= ENV['BACKEND_DB_HOST'] %> + pool: 10 + timeout: 5000 + reconnect: true