This is the template for using the mongoSchemaManager container. You can delete the sections below as you complete each setup.
- Update Dockerfile
Update the Dockerfile to provide environment variable values for your configuration. The commented values are the same as the default values, so if you don't set one that is the value that will be used.
- Update makefile
Update the makefile to provide the container name you will use when building the container.
- run
make local
and confirm that you get a log file ending withProcessing completed successfully!, exited with code 0
- run
make container
and confirm that you get a log file ending withProcessing completed successfully!, exited with code 0
At first, you should start by completing the following steps for one collection at a time. This will make configuration errors eaiser to find and correct.
- Define your Collection in the configurations/collections folder
You can rename and use the existing sample.json file, for the simplest possible configuration. See collections configuration files in the reference for details.
- Build the Schema.
You can rename and use the existing sample-1.0.0.json schema file. You can create any valid bson schema, but start simple and add constraints incrementally.
- Test your schema using the
make local
command to confirm that your schema is valid. Look for thatProcessing completed successfully!
" message
You can use any valid mongodb BSON schema. If you want to build a test databasee, take advantage of msm custom types, or enumerator management features you can continue with the following steps.
-
Implement Custom Types in your schema to eaisly add constraints. Then test again.
-
Define your Enumerations in the enumerators.json file.
-
Implement Enumerated Types in your schema, then Test again.
-
Create Test Data
If you want to create a test database with some set of testing data pre-loaded, you will want to create the test data files in the testData folder. See Loading Test Data in the reference for details.
That should get you started. See the official reference on GitHub for more information on how to configure indexes and migrations.
Describe your project here, at a minimum you should list and describe the collections.
View OpenApi specifications for the collections
make local
make container
make down