Skip to content

Commit 36573af

Browse files
committed
Add GitPod
1 parent 5c7ce1a commit 36573af

6 files changed

Lines changed: 34 additions & 36 deletions

File tree

.gitpod.yml

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,9 @@
11
ports:
2-
- name: Orion
3-
description: Context Broker
4-
port: 1026
5-
onOpen: notify
6-
- name: Wilma
7-
description: PEP Proxy
8-
port: 1027
2+
- name: Kurento
3+
description: WebRTC Media Server
4+
port: 8888
95
onOpen: ignore
106
- name: Tutorial App
11-
description: Web app displaying context data
12-
port: 3000
13-
onOpen: open-preview
14-
- name: Tutorial Devices
15-
description: Dummy IoT Sensors over HTTP
16-
port: 3001
17-
onOpen: ignore
18-
- name: Keyrock
19-
description: Identity Manager
20-
port: 3005
21-
onOpen: open-preview
22-
- name: MySQL
23-
description: Database for Keyrock
24-
port: 3306
25-
onOpen: ignore
26-
- name: IoT Agent (North Port)
27-
description: NGSI data and device provisioning
28-
port: 4041
29-
onOpen: ignore
30-
- name: IoT Agent (South Port)
31-
description: Ultralight HTTP measures
32-
port: 7896
33-
onOpen: ignore
34-
- name: MongoDB
35-
description: Database for Orion + IoT Agent
36-
port: 27017
37-
onOpen: ignore
7+
description: Web app generating a media stream
8+
port: 8443
9+
onOpen: open-preview

README.ja.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
このチュートリアルでは、[Docker](https://www.docker.com) コンテナから直接実行で
2020
きる一連の演習を紹介していますが、HTTP コールは必要ありません。
2121

22+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/FIWARE/tutorials.Linked-Data/tree/NGSI-v2)
23+
2224
## 内容
2325

2426
<details>

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ available.
1515
The tutorial introduces a series of exercises which can be run directly from within a [Docker](https://www.docker.com)
1616
container, no HTTP calls are required.
1717

18+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/FIWARE/tutorials.Linked-Data/tree/NGSI-v2)
19+
1820
- このチュートリアルは[日本語](README.ja.md)でもご覧いただけます。
1921

2022
## Contents

docker-compose/kurento-with-filters.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ version: "3.8"
22

33
services:
44
kurento-examples:
5+
labels:
6+
org.fiware: 'tutorial'
57
image: fiware/kurento-examples
68
container_name: examples-kurento
79
depends_on:
@@ -21,6 +23,8 @@ services:
2123
- "TUTORIAL_NAME=${TUTORIAL_NAME}"
2224

2325
kurento:
26+
labels:
27+
org.fiware: 'tutorial'
2428
image: kurento/kurento-media-server-plus-filters
2529
hostname: kurento
2630
container_name: fiware-kurento

docker-compose/kurento.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ version: "3.8"
22

33
services:
44
kurento-examples:
5+
labels:
6+
org.fiware: 'tutorial'
57
image: fiware/kurento-examples
68
container_name: examples-kurento
79
depends_on:
@@ -21,6 +23,8 @@ services:
2123
- "TUTORIAL_NAME=${TUTORIAL_NAME}"
2224

2325
kurento:
26+
labels:
27+
org.fiware: 'tutorial'
2428
image: kurento/kurento-media-server:${KURENTO_VERSION}
2529
hostname: kurento
2630
container_name: fiware-kurento

services

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,23 @@
1818
set -e
1919

2020
stoppingContainers () {
21-
echo "Stopping running containers"
22-
${dockerCmd} -f docker-compose/kurento-with-filters.yml down -v --remove-orphans
21+
CONTAINERS=$(docker ps --filter "label=org.fiware=tutorial" -aq)
22+
if [[ -n $CONTAINERS ]]; then
23+
echo "Stopping containers"
24+
docker rm -f $CONTAINERS || true
25+
fi
26+
VOLUMES=$(docker volume ls -qf dangling=true)
27+
if [[ -n $VOLUMES ]]; then
28+
echo "Removing old volumes"
29+
docker volume rm $VOLUMES || true
30+
fi
31+
NETWORKS=$(docker network ls --filter "label=org.fiware=tutorial" -q)
32+
if [[ -n $NETWORKS ]]; then
33+
echo "Removing tutorial networks"
34+
docker network rm $NETWORKS || true
35+
fi
2336
}
37+
2438
startingContainers () {
2539
echo -e "Starting containers: - \033[1;35mKurento\033[0m and \033[1mKurento-Examples (${command})\033[0m"
2640
echo -e "- \033[1;35mKurento\033[0m is a Media Server"

0 commit comments

Comments
 (0)