Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

Aspire.Hosting.MongoDB

Official
📦 Aspire.Hosting.MongoDBv17.0.0
Import pathapphost/modules/aspire
15Functions
5Types

Handles

Enums

Functions

MongoDBServerResource

methodAddDatabasebuilder
Adds a MongoDB database to the application model.
AddDatabase(name string, options ...*AddDatabaseOptions) MongoDBDatabaseResource
methodWithBindIpAllbuilder
Configures the MongoDB server to bind to and listen on all network interfaces.
WithBindIpAll() MongoDBServerResource
methodWithDataBindMountbuilder
Adds a bind mount for the data folder to a MongoDB container resource.
WithDataBindMount(source string, options ...*WithDataBindMountOptions) MongoDBServerResource
methodWithDataVolumebuilder
Adds a named volume for the data folder to a MongoDB container resource.
WithDataVolume(options ...*WithDataVolumeOptions) MongoDBServerResource
methodWithInitFilesbuilder
Copies init files into a MongoDB container resource.
WithInitFiles(source string) MongoDBServerResource
methodWithKeyFilebuilder
Sets up a keyfile for internal authentication between members of a MongoDB replica set, with the specified keyValue as the content of the file.
WithKeyFile(keyValue ExpressionValue, options ...*WithKeyFileOptions) MongoDBServerResource
methodWithMongoExpressbuilder
Adds a MongoExpress administration and development platform for MongoDB to the application model.
WithMongoExpress(options ...*WithMongoExpressOptions) MongoDBServerResource
methodWithReplbuilder
Adds a REPL command that opens an authenticated MongoDB shell in the dashboard terminal dock.
WithRepl() MongoDBServerResource
methodWithReplicaSetbuilder
Configures and initializes the MongoDB server as a single-member replica set for local development.
WithReplicaSet(options ...*WithReplicaSetOptions) MongoDBServerResource
methodWithTlsAllowInvalidCertificatesbuilder
Configures the MongoDB server to accept TLS connections whose peer certificate cannot be validated, by passing --tlsAllowInvalidCertificates to mongod.
WithTlsAllowInvalidCertificates() MongoDBServerResource
methodWithTlsModebuilder
Configures the --tlsMode the MongoDB server is started with when TLS is active.
WithTlsMode(options ...*WithTlsModeOptions) MongoDBServerResource