diff --git a/components/entitiy_ident/mongo/Dockerfile b/components/entitiy_ident/mongo/Dockerfile new file mode 100644 index 0000000..20803ee --- /dev/null +++ b/components/entitiy_ident/mongo/Dockerfile @@ -0,0 +1,8 @@ +FROM mongo:4.4 + +COPY ./import.sh . +COPY ./cars.json . +COPY ./traffic_lights.json . + +ADD import.sh /docker-entrypoint-initdb.d + diff --git a/components/entitiy_ident/mongo/cars.json b/components/entitiy_ident/mongo/cars.json new file mode 100644 index 0000000..a7fbc0e --- /dev/null +++ b/components/entitiy_ident/mongo/cars.json @@ -0,0 +1,17 @@ +[ + { + "oem": "BENTLEY", + "modelType": "Continental", + "vin": "SCBFR7ZA5CC072256" + }, + { + "oem": "SATURN", + "modelType": "Vue", + "vin": "5GZCZ43D13S812715" + }, + { + "oem": "SATURN", + "modelType": "Vue2", + "vin": "5GZCZ43D13S812715" + } +] \ No newline at end of file diff --git a/components/entitiy_ident/mongo/import.sh b/components/entitiy_ident/mongo/import.sh new file mode 100644 index 0000000..ec22493 --- /dev/null +++ b/components/entitiy_ident/mongo/import.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +mongoimport --db entities --collection cars --type json --file cars.json --jsonArray +mongoimport --db entities --collection trafficLights --type json --file traffic_lights.json --jsonArray diff --git a/components/entitiy_ident/mongo/traffic_lights.json b/components/entitiy_ident/mongo/traffic_lights.json new file mode 100644 index 0000000..e464166 --- /dev/null +++ b/components/entitiy_ident/mongo/traffic_lights.json @@ -0,0 +1,16 @@ +[ + { + "id": "1", + "location": { + "type": "Point", + "coordinates": [-73.856077, 40.848447] + } + }, + { + "id": "2", + "location": { + "type": "Point", + "coordinates": [-73.856077, 40.848447] + } + } +] \ No newline at end of file