database.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # MySQL. Versions 5.5.8 and up are supported.
  2. #
  3. # Install the MySQL driver
  4. # gem install mysql2
  5. #
  6. # Ensure the MySQL gem is defined in your Gemfile
  7. # gem 'mysql2'
  8. #
  9. # And be sure to use new-style password hashing:
  10. # https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
  11. #
  12. default: &default
  13. adapter: mysql2
  14. encoding: utf8mb4
  15. pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  16. username: root
  17. password:
  18. host: <%= ENV['MYSQL_HOST'] %>
  19. development:
  20. <<: *default
  21. database: usr_web1_capitest_development
  22. # Warning: The database defined as "test" will be erased and
  23. # re-generated from your development database when you run "rake".
  24. # Do not set this db to the same as development or production.
  25. test:
  26. <<: *default
  27. database: capitest_test
  28. # As with config/credentials.yml, you never want to store sensitive information,
  29. # like your database password, in your source code. If your source code is
  30. # ever seen by anyone, they now have access to your database.
  31. #
  32. # Instead, provide the password as a unix environment variable when you boot
  33. # the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
  34. # for a full rundown on how to provide these environment variables in a
  35. # production deployment.
  36. #
  37. # On Heroku and other platform providers, you may have a full connection URL
  38. # available as an environment variable. For example:
  39. #
  40. # DATABASE_URL="mysql2://myuser:mypass@<%= ENV['MYSQL_HOST'] %>/somedatabase"
  41. #
  42. # You can use this database configuration with:
  43. #
  44. # production:
  45. # url: <%= ENV['DATABASE_URL'] %>
  46. #
  47. production:
  48. <<: *default
  49. database: usr_web1_rails_demo_production
  50. username: web1
  51. password: <%= ENV['RAILS_DATABASE_PASSWORD'] %>