Created
March 25, 2020 12:09
-
-
Save piotrpolak/d92acc4bbdc94930f21406a6e5877051 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
mongo: | |
image: mongo:4.2 | |
ports: | |
- '27017-27019:27017-27019' | |
mongo-seed: | |
image: stefanwalther/mongo-seed | |
container_name: mongo-seed | |
environment: | |
- MONGODB_HOST=mongo | |
- MONGODB_PORT=27017 | |
volumes: | |
- ./docker/mongo-db-seed:/data | |
depends_on: | |
- mongo | |
# https://docs.mongodb.com/manual/reference/program/mongoimport/ | |
command: [ | |
"mongoimport --host mongo --port 27017 --db dcim --mode upsert --type json --file /data/SOME_COLLECTION.json && ", | |
"mongoimport --host mongo --port 27017 --db dcim --mode upsert --type json --file /data/SOME_OTHER_COLLECTION.json" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment