Skip to content

Commit a46f1df

Browse files
committed
Update Orion and MongoDB
1 parent 2fd5ccc commit a46f1df

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ COMPOSE_PROJECT_NAME=fiware
33

44
# Orion variables
55
ORION_PORT=1026
6-
ORION_VERSION=3.10.1
6+
ORION_VERSION=3.11.0
77

88
# MongoDB variables
99
MONGO_DB_PORT=27017
10-
MONGO_DB_VERSION=4.4
10+
MONGO_DB_VERSION=6.0

docker-compose.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#
1919
version: "3.8"
2020
services:
21-
# Orion is the context broker
22-
orion:
21+
# Orion is an NGSI-v2 context broker
22+
orion-v2:
2323
labels:
2424
org.fiware: 'tutorial'
2525
image: quay.io/fiware/orion:${ORION_VERSION}
@@ -53,10 +53,11 @@ services:
5353
volumes:
5454
- mongo-db:/data
5555
healthcheck:
56-
test: |
57-
host=`hostname --ip-address || echo '127.0.0.1'`;
58-
mongo --quiet $host/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' && echo 0 || echo 1
56+
test: ["CMD","mongosh", "--eval", "db.adminCommand('ping')"]
5957
interval: 5s
58+
timeout: 5s
59+
retries: 3
60+
start_period: 5s
6061

6162

6263
networks:

services

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ stoppingContainers () {
4545
}
4646

4747
addDatabaseIndex () {
48-
printf "Create \033[1mMongoDB\033[0m database indexes ..."
49-
docker exec db-mongo mongo --eval '
48+
printf "Adding appropriate \033[1mMongoDB\033[0m indexes for \033[1;34mOrion\033[0m ..."
49+
docker exec db-mongo mongosh --eval '
5050
conn = new Mongo();db.createCollection("orion");
5151
db = conn.getDB("orion");
5252
db.createCollection("entities");
5353
db.entities.createIndex({"_id.servicePath": 1, "_id.id": 1, "_id.type": 1}, {unique: true});
5454
db.entities.createIndex({"_id.type": 1});
5555
db.entities.createIndex({"_id.id": 1});' > /dev/null
56-
echo -e " \033[1;32mdone\033[0m"
5756
}
5857

58+
5959
displayServices () {
6060
echo ""
6161
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" --filter name=fiware-*

0 commit comments

Comments
 (0)