Skip to content

Instantly share code, notes, and snippets.

@yuri-karpovich
Last active July 26, 2021 11:52
Show Gist options
  • Save yuri-karpovich/1da15d34ba4f464a8f53d19d27b80a33 to your computer and use it in GitHub Desktop.
Save yuri-karpovich/1da15d34ba4f464a8f53d19d27b80a33 to your computer and use it in GitHub Desktop.
default: &default
adapter: mysql2
encoding: utf8
host: <%= ENV.fetch("MYSQL_HOST") { 'mysql' } %>
database: <%= ENV.fetch("MYSQL_DATABASE") %>
port: <%= ENV.fetch("MYSQL_PORT") { 3306 } %>
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 60 } %>
reconnect: true
username: <%= ENV.fetch("MYSQL_USER") %>
password: "<%= ENV.fetch("MYSQL_PASSWORD") %>"
variables:
sql_mode: TRADITIONAL,STRICT_TRANS_TABLES
production:
<<: *default
development:
<<: *default
# 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:
<<: *default
database: <%= [ENV.fetch("MYSQL_DATABASE"), 'test'].join('_') %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment