# 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'] || 3306]) %>
  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

# 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'] || 3306]) %>
  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

oldglossa:
  <% old_db = URI.parse ENV['OLD_GLOSSA_DB_URL'] || "" %>
  adapter: <%= old_db.scheme %>
  host: <%= old_db.host %>
  port: <%= old_db.port %>
  database: <%= URI.decode old_db.path[1..-1] || "" %>
  username: <%= URI.decode old_db.user || "" %>
  password: <%= URI.decode old_db.password || "" %>
  encoding: utf8
  pool: 5
  timeout: 5000

Read old Glossa connection info from an environment variable
Read old Glossa connection info from an environment variable
