Finalize project
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
FROM mongo:4.4
|
||||
|
||||
COPY ./cars.json .
|
||||
COPY ./traffic_lights.json .
|
||||
|
||||
ADD import.sh /docker-entrypoint-initdb.d
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"oem": "BENTLEY",
|
||||
"modelType": "Continental",
|
||||
"vin": "SCBFR7ZA5CC072256"
|
||||
},
|
||||
{
|
||||
"oem": "SATURN",
|
||||
"modelType": "Vue",
|
||||
"vin": "5GZCZ43D13S812715"
|
||||
},
|
||||
{
|
||||
"oem": "SATURN",
|
||||
"modelType": "Vue2",
|
||||
"vin": "5GZCZ43D13S812716"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/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
|
||||
|
||||
mongo --eval 'db.trafficLights.ensureIndex({location:"2dsphere"})' entities
|
||||
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"id": "1",
|
||||
"location": [16.20719, 47.89584],
|
||||
"switchingTime": 26,
|
||||
"color": "RED"
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"location": [16.20814, 47.90937],
|
||||
"switchingTime": 16,
|
||||
"color": "GREEN"
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"location": [16.20917, 47.92703],
|
||||
"switchingTime": 20,
|
||||
"color": "RED"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user