Skip to content

Commit c828ee1

Browse files
committed
Update Startup scripts
1 parent a789a82 commit c828ee1

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

docker-compose/common.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ services:
143143
deploy:
144144
resources:
145145
limits:
146+
memory: 1024M
147+
cpus: '2.0'
148+
reservations:
146149
memory: 512M
147150
cpus: '1.0'
148-
reservations:
149-
memory: 256M
150-
cpus: '0.5'
151151
environment:
152152
- IOTA_NORTH_PORT=${IOTA_NORTH_PORT}
153153
- IOTA_REGISTRY_TYPE=mongodb #Whether to hold IoT device info in memory or in a database

services

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# For this tutorial the commands are merely a convenience script to run docker compose
66
#
77

8-
set -e
8+
set -eo pipefail
99

1010
SCORPIO="http://scorpio:9090/"
1111
ORION="http://orion:1026/version"
1212
ORION2="http://orion2:1026/version"
13-
STELLIO="http://localhost:8080/actuator/health"
13+
STELLIO="http://stellio:8080/actuator/health"
1414
CONTEXT="http://context/user-context.jsonld"
1515
CORE_CONTEXT="https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld"
1616
DATA_LOADER="http://tutorial:3000"
@@ -41,7 +41,7 @@ pause(){
4141
}
4242

4343
getHeartbeat(){
44-
eval "response=$(docker run --network fiware_default --rm quay.io/curl/curl:${CURL_VERSION} -s -o /dev/null -w "%{http_code}" "$1")"
44+
response=$(docker run --network fiware_default --rm "quay.io/curl/curl:${CURL_VERSION}" -s -o /dev/null -w "%{http_code}" "$1")
4545
}
4646

4747
waitForOrionLD () {
@@ -98,12 +98,12 @@ waitForUserContext () {
9898

9999
waitForCoreContext () {
100100
echo -e "\n⏳ Checking availability of \033[1m core @context\033[0m from ETSI\n"
101-
eval "response=$(docker run --rm quay.io/curl/curl:${CURL_VERSION} -s -o /dev/null -w "%{http_code}" "$CORE_CONTEXT")"
101+
response=$(docker run --rm "quay.io/curl/curl:${CURL_VERSION}" -s -o /dev/null -w "%{http_code}" "$CORE_CONTEXT")
102102
while [ "${response}" -eq 000 ]
103103
do
104104
echo -e "\n@context HTTP state: ${response} (waiting for 200)"
105105
pause 3
106-
eval "response=$(docker run --rm quay.io/curl/curl:${CURL_VERSION} -s -o /dev/null -w "%{http_code}" "$CORE_CONTEXT")"
106+
response=$(docker run --rm "quay.io/curl/curl:${CURL_VERSION}" -s -o /dev/null -w "%{http_code}" "$CORE_CONTEXT")
107107
done
108108
}
109109

@@ -131,12 +131,12 @@ loadData () {
131131

132132
stoppingContainers () {
133133
CONTAINERS=$(docker ps -aq)
134-
if [[ -n $CONTAINERS ]]; then
134+
if [[ -n "$CONTAINERS" ]]; then
135135
echo "Stopping containers"
136136
docker rm -f $CONTAINERS
137137
fi
138138
VOLUMES=$(docker volume ls -qf dangling=true)
139-
if [[ -n $VOLUMES ]]; then
139+
if [[ -n "$VOLUMES" ]]; then
140140
echo "Removing old volumes"
141141
docker volume rm $VOLUMES
142142
fi

0 commit comments

Comments
 (0)