# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  <% db = URI.parse(ENV['DATABASE_URL'] || 'sqlite3:///db/development.sqlite3') %>
  adapter: <%= db.scheme %>
  host: <%= db.host %>
  port: <%= db.port %>
  database: <%= db.path[1..-1] %>
  username: <%= db.user %>
  password: <%= db.password %>
  encoding: utf8
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  <% db = URI.parse(ENV['DATABASE_URL'] ||
                    'mysql2://root:%s@mysql:%d/glossa' % [URI.encode ENV['MYSQL_ENV_MYSQL_ROOT_PASSWORD'],
                                                          ENV['MYSQL_PORT_3306_TCP_PORT']]) %>
  adapter: <%= db.scheme %>
  host: <%= db.host %>
  port: <%= db.port %>
  database: <%= URI.decode db.path[1..-1] %>
  username: <%= URI.decode db.user %>
  password: <%= URI.decode db.password %>
  encoding: utf8
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

Use Docker defaults if DATABASE_URL is not defined.
Use Docker defaults if DATABASE_URL is not defined.
