You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

69 lines
2.1 KiB

  1. # MySQL. Versions 5.6.4 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. socket: /var/run/mysqld/mysqld.sock
  19. development:
  20. <<: *default
  21. database: backend_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: backend_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 or a full connection URL as an environment
  33. # variable when you boot the app. For example:
  34. #
  35. # DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
  36. #
  37. # If the connection URL is provided in the special DATABASE_URL environment
  38. # variable, Rails will automatically merge its configuration values on top of
  39. # the values provided in this file. Alternatively, you can specify a connection
  40. # URL environment variable explicitly:
  41. #
  42. # production:
  43. # url: <%= ENV["MY_APP_DATABASE_URL"] %>
  44. #
  45. # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
  46. # for a full overview on how database connection configuration can be specified.
  47. #
  48. production:
  49. primary: &primary_production
  50. <<: *default
  51. database: backend_production
  52. username: backend
  53. password: <%= ENV["BACKEND_DATABASE_PASSWORD"] %>
  54. cache:
  55. <<: *primary_production
  56. database: backend_production_cache
  57. migrations_paths: db/cache_migrate
  58. queue:
  59. <<: *primary_production
  60. database: backend_production_queue
  61. migrations_paths: db/queue_migrate
  62. cable:
  63. <<: *primary_production
  64. database: backend_production_cable
  65. migrations_paths: db/cable_migrate