Skip to content

Commit 6dfcc40

Browse files
committed
Update Orion and MongoDB
1 parent f7cf9b3 commit 6dfcc40

4 files changed

Lines changed: 31 additions & 7 deletions

File tree

docker-compose/common.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,25 @@
1717
# see: https://github.com/FIWARE/helm-charts/
1818
#
1919
version: '3.9'
20-
services:
20+
services:
21+
# @context file is served from here
22+
ld-context:
23+
labels:
24+
org.fiware: 'tutorial'
25+
image: httpd:alpine
26+
hostname: context
27+
container_name: fiware-ld-context
28+
ports:
29+
- "3004:80"
30+
volumes:
31+
- data-models:/usr/local/apache2/htdocs/
32+
- type: bind
33+
source: ${PWD}/conf/mime.types
34+
target: /usr/local/apache2/conf/mime.types
35+
read_only: true
36+
healthcheck:
37+
test: (wget --server-response --spider --quiet http://ld-context/ngsi-context.jsonld 2>&1 | awk 'NR==1{print $$2}'| grep -q -e "200") || exit 1
38+
2139
# Databases
2240
mongo-db:
2341
labels:
@@ -87,3 +105,9 @@ networks:
87105

88106
volumes:
89107
mongo-db: ~
108+
data-models:
109+
driver: local
110+
driver_opts:
111+
type: none
112+
o: bind
113+
device: ${PWD}/data-models

docker-compose/orion-ld.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
#
1919
version: '3.9'
2020
services:
21-
# Orion is the context broker
22-
orion:
21+
# Orion-LD is an NGSI-LD context broker
22+
orion-ld:
2323
labels:
2424
org.fiware: 'tutorial'
2525
image: quay.io/fiware/orion-ld:${ORION_LD_VERSION}
2626
hostname: orion
27-
container_name: fiware-orion
27+
container_name: fiware-orion-ld
2828
depends_on:
2929
- mongo-db
3030
networks:

docker-compose/scorpio.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919
version: '3.9'
2020
services:
21-
# Scorpio is the context broker
21+
# Scorpio is an NGSI-LD context broker
2222
scorpio:
2323
labels:
2424
org.fiware: 'tutorial'

services

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ loadData () {
123123

124124
addDatabaseIndex () {
125125
printf "Adding appropriate \033[1mMongoDB\033[0m indexes for \033[1;34mOrion\033[0m ..."
126-
docker exec db-mongo mongo --eval '
126+
docker exec db-mongo mongo --eval '
127127
conn = new Mongo();db.createCollection("orion");
128128
db = conn.getDB("orion");
129129
db.createCollection("entities");
130130
db.entities.createIndex({"_id.servicePath": 1, "_id.id": 1, "_id.type": 1}, {unique: true});
131131
db.entities.createIndex({"_id.type": 1});
132132
db.entities.createIndex({"_id.id": 1});' > /dev/null
133133

134-
docker exec db-mongo mongo --eval '
134+
docker exec db-mongo mongo --eval '
135135
conn = new Mongo();db.createCollection("orion-openiot");
136136
db = conn.getDB("orion-openiot");
137137
db.createCollection("entities");

0 commit comments

Comments
 (0)