A Docker image to seed a Mongo database
50K+
mongo-seed service.MONGO_HOSTand MONGO_PORT accordingly to your stack.Assuming the presence of a people.json file inside a local data directory.
version: '3'
services:
mongo-seed:
image: fvilers/mongo-seed
environment:
- MONGO_HOST=mongo
- MONGO_PORT=27017
volumes:
- ./data:/data
command:
"mongoimport --host mongo --port 27017 --db test --mode upsert --type json --file /data/people.json --jsonArray"
mongo:
image: mongo:3.4
Content type
Image
Digest
Size
31.5 MB
Last updated
over 6 years ago
docker pull fvilers/mongo-seed