Import data to MongoDB
To import, restore, or for any operation before using MongoDB in your application, look at the following example.
You just need to create Dockerfile for Mongo seed service and provide the command to prepare MongoDB. In this case, the command is mongoimport
.
Dockerfile mongo_seed
Looking around
In the root of this repository you’ll find a file named docker-compose.yml
.
Let’s quickly review the contents of this file:
docker-compose.yml
TIP
You can add the following example to your GitHub or Bitbucket account, and build the example.