![]() ![]() (default: "_type") discriminator_key : "_type" # Raise an exception when a field is redefined. (default: true) belongs_to_required_by_default : true # Set the global discriminator key. (default: false) background_indexing : false # Mark belongs_to associations as required by default, so that saving a # model with a missing belongs_to association will trigger a validation # error. (default: nil) app_name : MyApplicationName # Create indexes in background by default. It is also used as the database name if the # database name is not explicitly defined. Note that the name cannot # exceed 128 bytes. (optional) options : # Application name that is printed to the mongodb logs upon establishing # a connection in server versions >= 3.4. (default is to not use compression) compressors : # Configure Mongoid specific options. ssl_ca_cert : /path/to/ca.cert # Compressors to use. (default: true) ssl_verify : true # The file containing a set of concatenated certification authority certifications # used to validate certs passed from the other end of the connection. ssl_key_pass_phrase : password # Whether or not to do peer certification validation. ssl_key : /path/to/my.key # A passphrase for the private key. # Note that even if the key is stored in the same file as the certificate, # both need to be explicitly specified. ssl_cert : /path/to/my.cert # The private keyfile used to identify the connection against MongoDB. (default: false) ssl : true # The certificate file used to identify the connection against MongoDB. replica_set : my_replica_set # Whether to connect to the servers via ssl. Servers provided as seeds that do # not belong to this replica set will be ignored. # (default: nil) socket_timeout : 5 # The name of the replica set to connect to. # (default: 10) connect_timeout : 10 # The timeout to wait to execute operations on a socket before raising an error. (default: 1) wait_queue_timeout : 1 # The time to wait to establish a connection before timing out, in seconds. (default: 1) min_pool_size : 1 # The time to wait, in seconds, in the connection pool for a connection # to be checked in before timing out. (default: 5) max_pool_size : 5 # The minimum number of connections in the connection pool. (default: 30) server_selection_timeout : 30 # The maximum number of connections in the connection pool. (default: 0.015) local_threshold : 0.015 # The timeout in seconds for selecting a server for an operation. (default: 10) heartbeat_frequency : 10 # The time in seconds for selecting servers for a near read preference. connect : :direct # Change the default time in seconds the server monitors refresh their status # via hello commands. Set to :direct # when connecting to hidden members of a replica set. Can be one of: :direct, :replica_set, :sharded. (default: admin) auth_source : admin # Force the driver to connect in a specific way instead of auto- # discovering. (default on 3.0 is :scram, default # on 2.4 and 2.6 is :plain) auth_mech : :scram # The database or source to authenticate the user against. Valid options are: :scram, # :mongodb_cr, :mongodb_x509, and :plain. ![]() roles : - 'dbOwner' # Change the default authentication mechanism. password : 'password' # The user's database roles. user : 'user' # The password of the user for authentication. Valid options for mode are: :secondary, # :secondary_preferred, :primary, :primary_preferred, :nearest # (default: primary) read : mode : :secondary_preferred tag_sets : - use : web # The name of the user for authentication. (default = ) write : w : 1 # Change the default read preference. ![]() (required) hosts : - :27017 - :27017 - :27017 options : # These options are Ruby driver options, documented in # Change the default write concern. database : my_db # Provide the hosts the default client can connect to. Alternatively, you can # define the following: # Define the name of the default database that Mongoid can connect to. (required) default : # A uri may be defined for a client: # uri: # Please see driver documentation for details. (required) clients : # Define the default client. Development : # Configure available database clients. ![]()
0 Comments
Leave a Reply. |