Adding MongoDB to your Shell
You can start by adding the mongodb server to your project by runningdevbox add mongodb
. We also
recommend adding the MongoDB shell for interacting with your database using devbox add mongosh
:
devbox.json
by adding it to your include
list:
Starting the MongoDB Service
The MongoDB plugin will automatically create a service for you that can be run withdevbox services up
. The process-compose.yaml for this default service is shown below:
mongodb
. For more details, see the
process-compose documentation
Environment Variables
The MongoDB plugin will configure the following environment variablesenv
section of your devbox.json
file.
Files
The plugin will also create a default [mongod.conf
] file in your devbox.d
directory, if one
doesn’t already exist there. This default file mostly serves as a placeholder, and you can modify it
as needed.
For a full list of configuration options, see the
MongoDB documentation
Edit this page