2022-11-05 21:42:38 +00:00
|
|
|
version: "3.9"
|
|
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
mongo:
|
|
|
|
image: "mongo:6.0.2-focal"
|
2022-11-06 14:59:41 +00:00
|
|
|
ports:
|
|
|
|
- "127.0.0.1:27017:27017"
|
2022-11-05 21:42:38 +00:00
|
|
|
environment:
|
|
|
|
MONGO_INITDB_ROOT_USERNAME: "unimore"
|
|
|
|
MONGO_INITDB_ROOT_PASSWORD: "unimore"
|
|
|
|
MONGO_INITDB_DATABASE: "amazon"
|
|
|
|
|
|
|
|
mongoimport:
|
|
|
|
image: "mongo:6.0.2-focal"
|
|
|
|
volumes:
|
|
|
|
- "./seed:/seed"
|
|
|
|
entrypoint: >-
|
|
|
|
mongoimport
|
|
|
|
--host mongo
|
|
|
|
--db amazon
|
|
|
|
--authenticationDatabase admin
|
|
|
|
--username unimore
|
|
|
|
--password unimore
|
|
|
|
--collection meta
|
|
|
|
--type json
|
|
|
|
--file /seed/metaexport.json
|
|
|
|
depends_on:
|
|
|
|
mongo:
|
|
|
|
condition: service_started
|