forked from fixin.me/fixin.me
Add database configurations steps
This commit is contained in:
49
config/database.yml.dist
Normal file
49
config/database.yml.dist
Normal file
@@ -0,0 +1,49 @@
|
||||
# If you don't want to store sensitive information, like your database password,
|
||||
# in your source code, provide the password or a full connection URL as an
|
||||
# environment variable when you boot the app. For example:
|
||||
#
|
||||
# DATABASE_PASSWORD="some-password"
|
||||
#
|
||||
# or
|
||||
#
|
||||
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
|
||||
#
|
||||
# If the connection URL is provided in the special DATABASE_URL environment
|
||||
# variable, Rails will automatically merge its configuration values on top of
|
||||
# the values provided in this file. Alternatively, you can specify a connection
|
||||
# URL environment variable explicitly:
|
||||
#
|
||||
# production:
|
||||
# url: <%= ENV["MY_APP_DATABASE_URL"] %>
|
||||
#
|
||||
# You can specify password environment variable in a similar way:
|
||||
#
|
||||
# production:
|
||||
# password: <%= ENV["DATABASE_PASSWORD"] %>
|
||||
#
|
||||
# Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
|
||||
# for a full overview on how database connection configuration can be specified.
|
||||
default: &default
|
||||
adapter: mysql2
|
||||
encoding: utf8mb4
|
||||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||
username: fixinme
|
||||
password:
|
||||
socket: /run/mysqld/mysqld.sock
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
database: fixinme_production
|
||||
|
||||
# Unless you're planning on developing the application, you can skip/remove
|
||||
# configurations for development and test databases altogether.
|
||||
development:
|
||||
<<: *default
|
||||
database: fixinme_dev
|
||||
|
||||
# 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: fixinme_test
|
||||
Reference in New Issue
Block a user