Compare commits

...

2 Commits

Author SHA1 Message Date
Eric FELIXINE
a05e13c30c feat(lorawan): ajout ChirpStack et The Things Stack
- Skills créés: chirpstack-lorawan, the-things-stack-lorawan
- docker-compose.chirpstack.yml: ChirpStack derrière Traefik
- docker-compose.the-things-stack.yml: TTS derrière Traefik
- data-flow-diagram.md: mise à jour avec LoRaWAN
- DOCKER-ARCHITECTURE: ajout conteneurs LoRaWAN
- Subdomaines Traefik: chirpstack, tts

Skills créés dans ~/.hermes/skills/iot/:
- chirpstack-lorawan
- the-things-stack-lorawan
2026-05-12 11:29:30 -04:00
Eric FELIXINE
dbf8b7f5ca docs: état des lieux localisation capteurs OpenRemote
- Documentation des découvertes et corrections appliquées
- Problèmes restants identifiés (connexion MQTT, topics, déconnexion)
- Prochaines étapes recommandées
2026-05-12 08:18:32 -04:00
6 changed files with 1671 additions and 21 deletions

View File

@@ -1,12 +1,12 @@
# Smart City Digital Twin - Architecture Docker (Stellio Pipeline Added)
**Date** : 07 mai 2026
# Smart City Digital Twin - Architecture Docker (LoRaWAN Added)
**Date** : 12 mai 2026
**Projet** : `smart-city-digital-twin-martinique`
**Auteur** : Éric FELIXINE (via Hermes Agent)
---
## 1. Vue d'ensemble
Cette cartographie présente l'architecture Docker complète du jumeau numérique Smart City (Martinique), incluant les conteneurs, images, réseaux et ports exposés.
Cette cartographie présente l'architecture Docker complète du jumeau numérique Smart City (Martinique), incluant les conteneurs, images, réseaux et ports exposés. **Mise à jour 2026-05-12** : ajout de ChirpStack et The Things Stack pour la connectivité LoRaWAN.
---
@@ -22,6 +22,22 @@ Simulator → MQTT Brokers (Mosquitto/EMQX/BunkerM) → IoT Agents → Orion-LD
Simulator → MQTT Brokers → IoT Agents → Stellio Context Broker → QuantumLeap-Stellio → CrateDB-Stellio → Grafana
```
### Pipeline LoRaWAN ChirpStack (Nouveau 🆕)
```
Gateway LoRaWAN (UDP 1700) → ChirpStack Gateway Bridge → ChirpStack → MQTT (Mosquitto interne) → EMQX → IoT Agents → Orion-LD → ...
```
### Pipeline LoRaWAN The Things Stack (Nouveau 🆕)
```
Gateway LoRaWAN (UDP 1700) → TTS Stack → MQTT/REST API → EMQX → IoT Agents → Orion-LD → ...
```
### Pipeline OpenRemote (En cours ⚠️)
```
Simulator → REST API (PUT assets avec location) → OpenRemote Manager → Map Martinique
Simulator → MQTT (Artemis broker) → OpenRemote Agents → Asset values
```
---
## 3. Liste des Conteneurs Actifs (Projet Smart City)
@@ -46,9 +62,20 @@ Simulator → MQTT Brokers → IoT Agents → Stellio Context Broker → Quantum
| **`smart-city-cratedb-stellio`** | `crate:latest` | `smartcity-shared` | `4200:4200` |
| `smart-city-redis` | `redis:7-alpine` | `smartcity-shared` | `6379:6379` |
| `smart-city-grafana` | `grafana/grafana:latest` | `smartcity-shared`, `traefik-public` | `3000:3000` |
| `openremote-manager-1` | `openremote/manager:latest` | `openremote_default`, `smartcity-shared` | `8080:8080`, `8443:8443` |
| `openremote-keycloak-1` | `openremote/keycloak:latest` | `openremote_default`, `smartcity-shared` | `8080:8080`, `8443:8443` |
| `traefik` | `traefik:v3.0` | `traefik-public`, `openremote_default` | `80:80`, `443:443` |
|| `openremote-manager-1` | `openremote/manager:latest` | `openremote_default`, `smartcity-shared` | `8080:8080`, `8443:8443` |
|| `openremote-keycloak-1` | `openremote/keycloak:latest` | `openremote_default`, `smartcity-shared` | `8080:8080`, `8443:8443` |
|| `traefik` | `traefik:v3.0` | `traefik-public`, `openremote_default` | `80:80`, `443:443` |
|| **ChirpStack LoRaWAN** | | | |
|| `chirpstack-chirpstack-1` | `chirpstack/chirpstack:4` | `chirpstack-internal`, `traefik-public`, `smartcity-shared` | `8080:8080` |
|| `chirpstack-gateway-bridge-1` | `chirpstack/chirpstack-gateway-bridge:4` | `chirpstack-internal` | `1700:1700/udp` |
|| `chirpstack-rest-api-1` | `chirpstack/chirpstack-rest-api:4` | `chirpstack-internal`, `traefik-public` | `8090:8090` |
|| `chirpstack-postgres-1` | `postgres:14-alpine` | `chirpstack-internal` | `5432` |
|| `chirpstack-redis-1` | `redis:7-alpine` | `chirpstack-internal` | `6379` |
|| `chirpstack-mosquitto-1` | `eclipse-mosquitto:2` | `chirpstack-internal`, `smartcity-shared` | `1883` |
|| **The Things Stack LoRaWAN** | | | |
|| `tts-stack-1` | `thethingsnetwork/lorawan-stack:latest` | `tts-internal`, `traefik-public`, `smartcity-shared` | `1885:1885`, `1884:1884`, `1700:1700/udp` |
|| `tts-postgres-1` | `postgres:14` | `tts-internal` | `5432` |
|| `tts-redis-1` | `redis:7` | `tts-internal` | `6379` |
---
@@ -58,8 +85,10 @@ Simulator → MQTT Brokers → IoT Agents → Stellio Context Broker → Quantum
|---------|----------------------|
| `smartcity-shared` | Tous les services Smart City (simulator, brokers, context brokers, databases, grafana) |
| `stellio-context-broker_default` | Stellio services (api-gateway, subscription, search, kafka, postgres) |
| `traefik-public` | Services exposés via Traefik (grafana, mapstore, pulsar, stellio, orion, etc.) |
| `traefik-public` | Services exposés via Traefik (grafana, mapstore, pulsar, stellio, orion, chirpstack, tts, etc.) |
| `openremote_default` | OpenRemote services (manager, keycloak, postgresql) |
| `chirpstack-internal` | ChirpStack services (chirpstack, gateway-bridge, rest-api, postgres, redis, mosquitto) |
| `tts-internal` | TTS services (stack, postgres, redis) |
---

View File

@@ -0,0 +1,65 @@
# État des lieux - Localisation des capteurs sur les maps OpenRemote
## Problème initial
Les capteurs du simulateur n'apparaissent pas sur les maps OpenRemote (realm master et smart city martinique).
## Découvertes
### 1. Deux sets d'assets en BDD
- **Anciens assets** (avec suffixe `(traffic)`, `(airquality)`, etc.) : ont `agentLink` MQTT + `location` GeoJSON → ce sont les bons
- **Nouveaux assets** (sans suffixe, créés par le simulateur via REST) : sans `agentLink`, sans `location`
### 2. Format de la location
L'attribut `location` dans OpenRemote utilise le format GeoJSON Point :
```json
{"type": "GeoJSONPoint", "value": {"type": "Point", "coordinates": [lat, lon]}}
```
### 3. Compteur SENSORS global
Le compteur utilisé pour générer les clés SENSORS est **global** (pas par type) :
- traffic: 0-9, airquality: 10-19, parking: 20-29, noise: 30-39, weather: 40-49, light: 50-59
### 4. API REST refuse les PUT sur assets avec agentLink
L'API REST d'OpenRemote refuse les mises à jour (HTTP 403) sur les assets qui ont un `agentLink` actif. C'est une protection pour éviter les conflits avec l'agent MQTT.
### 5. Connexion MQTT au broker Artemis
Le broker Artemis d'OpenRemote nécessite un **"Service user"** avec username/password pour l'authentification MQTT (rc=5 = Not Authorized sans credentials). La documentation mentionne ce mécanisme mais ne détaille pas comment créer le service user.
### 6. Topics MQTT pour l'API interne
La documentation indique que les topics pour publier des valeurs d'attributs sont :
- `{realm}/{clientId}/writeattributevalue/{attributeName}/{assetId}` - Payload: JSON de la valeur
- `{realm}/{clientId}/writeattribute/{attributeName}/{assetId}` - Payload: `{"value": <VALUE>, "timestamp": <TIMESTAMP>}`
Le format `smartcity/{type}/{id}` utilisé par le simulateur est pour les agents MQTT externes, pas pour l'API MQTT interne.
## Corrections appliquées au simulateur
1. **ASSET_MAP mis à jour** avec les bons asset IDs (ceux avec agentLink + location)
2. **Location ajoutée dans le payload REST** (GeoJSONPoint)
3. **Topics MQTT corrigés** (index basé sur position du capteur, pas compteur global)
4. **REST désactivé** pour les assets avec agentLink (403)
5. **Connexion MQTT anonyme** au broker Artemis (rc=5 persistant)
## Problèmes restants
### Connexion MQTT au broker Artemis
Le broker refuse les connexions anonymes (rc=5). Il faut un "Service user" dont la création n'est pas documentée. Solutions possibles :
1. Créer un service user via l'UI OpenRemote (Manager UI → Users)
2. Modifier la configuration Artemis pour accepter les connexions anonymes
3. Utiliser un broker MQTT externe (EMQX) et configurer un agent MQTT dans OpenRemote
### Topics MQTT
Le simulateur publie sur `smartcity/{type}/{index}` mais l'API MQTT d'OpenRemote attend `{realm}/{clientId}/writeattributevalue/{attributeName}/{assetId}`. Il faut soit :
1. Changer le format des topics dans le simulateur
2. Configurer un agent MQTT dans OpenRemote qui écoute sur `smartcity/#`
### Déconnexion cyclique
Le broker Artemis déconnecte le client MQTT du simulateur de manière cyclique. Cause possible : keepalive trop court ou configuration du broker.
## Prochaines étapes recommandées
1. **Créer un service user** dans OpenRemote pour l'authentification MQTT
2. **Configurer un agent MQTT** dans OpenRemote qui écoute sur `smartcity/#` et mappe les topics vers les attributs des assets
3. **Corriger le format des topics** dans le simulateur pour utiliser le format de l'API MQTT d'OpenRemote
4. **Tester la connexion MQTT** avec les bons credentials
5. **Vérifier la localisation** sur les maps OpenRemote une fois que les agents MQTT reçoivent les données

View File

@@ -1,28 +1,23 @@
# Smart City Digital Twin - Data Flow Diagram (Updated 2026-05-06)
# Smart City Digital Twin - Data Flow Diagram (Updated 2026-05-12)
## Architecture évoluée : 1 IoT-Agent par broker MQTT
## Architecture complète avec LoRaWAN
```
┌─────────────────────────────────────────────────────────────────────────────┐
│ Smart City Simulator (Python) │
│ Publie sur 3 brokers MQTT avec format IoT-Agent JSON
│ Publie sur 3 brokers MQTT + REST vers OpenRemote
└──────────┬────────────────────┬──────────────────────┬───────────────────┘
│ │ │
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ EMQX Broker │ │ Mosquitto Broker │ │ BunkerM Broker │
│ (port 11883) │ │ (port 1883) │ │ (port 1900) │
│ Topic: smart- │ │ Topic: smart- │ │ Topic: smart- │
│ city-api-key/ │ │ city-api-key/ │ │ city-api-key/ │
│ {id}/attrs │ │ {id}/attrs │ │ {id}/attrs │
└────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘
│ │ │
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ IoT-Agent-EMQX │ │IoT-Agent-Mosquitto│ │IoT-Agent-BunkerM │
│ Port: 4041 │ │ Port: 4042 │ │ Port: 4043 │
│ Apikey: smart- │ │ Apikey: smart- │ │ Apikey: smart- │
│ city-api-key │ │ city-api-key │ │ city-api-key │
└────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘
│ │ │
└───────────────────────┴──────────────────────┘
@@ -34,33 +29,150 @@
│ MongoDB backend │
└─────────┬───────────┘
│ Subscription (id: 69fbb09af55b82cad2a38008)
│ Forward to QuantumLeap
│ Subscription → QuantumLeap
┌─────────────────────┐
│ QuantumLeap │
│ (port 8668) │
│ /v2/op/notify │
└─────────┬───────────┘
┌─────────────────────┐
│ CrateDB │
│ (ports 5432/4200)│
│ DB: quantumleap │
└─────────┬───────────┘
┌─────────────────────┐
│ Grafana │
│ (port 3001) │
│ Datasource: │
│ CrateDB-SmartCity│
└─────────────────────┘
═══════════════════════════════════════════════════════════════════════════════
LoRaWAN Layer
═══════════════════════════════════════════════════════════════════════════════
┌──────────────────┐ ┌──────────────────┐
│ Gateway LoRaWAN │ UDP │ Gateway LoRaWAN │
│ (EU868) │ 1700 │ (EU868) │
└────────┬─────────┘ └────────┬─────────┘
│ │
▼ ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ ChirpStack LoRaWAN Network Server │
│ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
│ │ chirpstack │ │ gateway-bridge │ │ rest-api │ │
│ │ (port 8080) │ │ (UDP 1700) │ │ (port 8090) │ │
│ └────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
│ │ PostgreSQL │ │ Redis │ │ Mosquitto (MQTT) │ │
│ │ (chirpstack DB) │ │ (cache) │ │ (port 1883) │ │
│ └──────────────────┘ └──────────────────┘ └────────┬─────────┘ │
└──────────────────────────────────────────────────────┬─────────────────────┘
┌──────────────────┐
│ EMQX Broker │
│ (integration) │
└──────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ The Things Stack LoRaWAN Network Server │
│ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
│ │ tts-stack │ │ tts-postgres │ │ tts-redis │ │
│ │ (port 1885) │ │ (TTN DB) │ │ (cache) │ │
│ └────────┬─────────┘ └──────────────────┘ └──────────────────┘ │
│ │ │
│ │ UDP 1700 (gateways) │
│ │ MQTT 1883 (events) │
│ │ HTTP 1884 (API) │
│ │ HTTP 1885 (Console) │
└───────────┬─────────────────────────────────────────────────────────────────┘
┌──────────────────┐
│ EMQX Broker │
│ (integration) │
└──────────────────┘
═══════════════════════════════════════════════════════════════════════════════
OpenRemote Manager
═══════════════════════════════════════════════════════════════════════════════
┌─────────────────────────────────────────────────────────────────────────────┐
│ OpenRemote Manager (Artemis MQTT) │
│ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Manager UI │ │ Keycloak │ │ PostgreSQL │ │
│ │ (port 8080) │ │ (port 8080) │ │ (port 5432) │ │
│ └──────────────────┘ └──────────────────┘ └──────────────────┘ │
│ │
│ Assets IOTSensor avec agentLink MQTT + location (GeoJSON Point) │
│ Assets visualisés sur la carte Martinique (mapsettings.json) │
└─────────────────────────────────────────────────────────────────────────────┘
```
## Flux de données (Step-by-step)
1. **Simulator** publie sur 3 brokers MQTT (EMQX:11883, Mosquitto:1883, BunkerM:1900)
- Topic: `smartcity-api-key/{device_id}/attrs`
- Format: `{"NO2": 45.5, "temperature": 26.0, "humidity": 70.0}`
2. **3 IoT-Agents** (un par broker) reçoivent les messages
- iot-agent-emqx (port 4041) ← EMQX
- iot-agent-mosquitto (port 4042) ← Mosquitto
- iot-agent-bunkerm (port 4043) ← BunkerM
3. **Orion-LD** reçoit les entités NGSI-v2
- URL: `http://smart-city-orion-ld:1026`
- Entité: `urn:ngsi-ld:AirQualityObserved:airquality_001`
4. **Subscription Orion-LD → QuantumLeap**
- Notify URL: `http://smart-city-quantumleap:8668/v2/op/notify`
5. **QuantumLeap** stocke dans **CrateDB**
- Table: `quantumleap.etairqualityobserved`
6. **Grafana** visualise les données
- Datasource: `CrateDB-SmartCity`
7. **ChirpStack** gère les gateways et devices LoRaWAN
- Gateway Bridge (UDP 1700) → ChirpStack → MQTT → EMQX
- REST API (port 8090) pour gestion des devices/applications
8. **The Things Stack** gère les gateways et devices LoRaWAN (alternative)
- Gateway (UDP 1700) → TTS Stack → MQTT/REST API
- Console web (port 1885)
9. **OpenRemote** affiche les assets sur la map
- Assets IOTSensor avec location GeoJSON
- Agents MQTT pour mise à jour des valeurs
## Sous-domaines (Traefik)
### IoT Agents & Brokers
- `iot-agent-emqx.digitribe.fr` → IoT-Agent-EMQX (port 4041)
- `iot-agent-mosquitto.digitribe.fr` → IoT-Agent-Mosquitto (port 4042)
- `iot-agent-bunkerm.digitribe.fr` → IoT-Agent-BunkerM (port 4043)
- `orion-ld.digitribe.fr` → Orion-LD (port 1026)
- `quantum-leap.digitribe.fr` → QuantumLeap (port 8668)
- `grafana.digitribe.fr` → Grafana (port 3001)
### ChirpStack LoRaWAN
- `chirpstack.digitribe.fr` → ChirpStack Console (port 8080)
- `chirpstack-api.digitribe.fr` → ChirpStack REST API (port 8090)
- `chirpstack-ws.digitribe.fr` → Gateway Bridge WebSocket (port 3001)
### The Things Stack LoRaWAN
- `tts.digitribe.fr` → TTS Console (port 1885)
- `tts-api.digitribe.fr` → TTS REST API (port 1884)
### OpenRemote
- `openremote.digitribe.fr` → OpenRemote Manager (port 8080)
## Flux de données (Step-by-step)
1. **Simulator** publie sur 3 brokers MQTT (EMQX:11883, Mosquitto:1883, BunkerM:1900)
- Topic: `smartcity-api-key/{device_id}/attrs`
- Format: `{"NO2": 45.5, "temperature": 26.0, "humidity": 70.0}`

View File

@@ -0,0 +1,134 @@
version: "3.8"
# =============================================================================
# ChirpStack LoRaWAN Network Server — Smart City Digital Twin
# =============================================================================
# Déploiement derrière Traefik avec sous-domaines dédiés
# Subdomaines:
# - chirpstack.digitribe.fr → Console web (port 8080)
# - chirpstack-api.digitribe.fr → REST API (port 8090)
# - chirpstack-ws.digitribe.fr → Gateway Bridge WebSocket (port 3001)
# =============================================================================
services:
chirpstack:
image: chirpstack/chirpstack:4
command: -c /etc/chirpstack
restart: unless-stopped
volumes:
- ./configuration/chirpstack:/etc/chirpstack
depends_on:
- postgres
- mosquitto
- redis
environment:
- MQTT_BROKER_HOST=mosquitto
- REDIS_HOST=redis
- POSTGRESQL_HOST=postgres
labels:
- "traefik.enable=true"
- "traefik.http.routers.chirpstack.rule=Host(`chirpstack.digitribe.fr`)"
- "traefik.http.routers.chirpstack.entrypoints=websecure"
- "traefik.http.routers.chirpstack.tls.certresolver=letsencrypt"
- "traefik.http.services.chirpstack.loadbalancer.server.port=8080"
networks:
- traefik-public
- chirpstack-internal
- smartcity-shared
chirpstack-gateway-bridge:
image: chirpstack/chirpstack-gateway-bridge:4
restart: unless-stopped
ports:
- "1700:1700/udp"
volumes:
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
environment:
- INTEGRATION__MQTT__EVENT_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}
- INTEGRATION__MQTT__STATE_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/state/{{ .StateType }}
- INTEGRATION__MQTT__COMMAND_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/command/#
depends_on:
- mosquitto
networks:
- chirpstack-internal
chirpstack-gateway-bridge-basicstation:
image: chirpstack/chirpstack-gateway-bridge:4
restart: unless-stopped
command: -c /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge-basicstation-eu868.toml
labels:
- "traefik.enable=true"
- "traefik.http.routers.chirpstack-ws.rule=Host(`chirpstack-ws.digitribe.fr`)"
- "traefik.http.routers.chirpstack-ws.entrypoints=websecure"
- "traefik.http.routers.chirpstack-ws.tls.certresolver=letsencrypt"
- "traefik.http.services.chirpstack-ws.loadbalancer.server.port=3001"
volumes:
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
depends_on:
- mosquitto
networks:
- traefik-public
- chirpstack-internal
chirpstack-rest-api:
image: chirpstack/chirpstack-rest-api:4
restart: unless-stopped
command: --server chirpstack:8080 --bind 0.0.0.0:8090 --insecure
labels:
- "traefik.enable=true"
- "traefik.http.routers.chirpstack-api.rule=Host(`chirpstack-api.digitribe.fr`)"
- "traefik.http.routers.chirpstack-api.entrypoints=websecure"
- "traefik.http.routers.chirpstack-api.tls.certresolver=letsencrypt"
- "traefik.http.services.chirpstack-api.loadbalancer.server.port=8090"
depends_on:
- chirpstack
networks:
- traefik-public
- chirpstack-internal
postgres:
image: postgres:14-alpine
restart: unless-stopped
volumes:
- ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d
- chirpstack-postgresqldata:/var/lib/postgresql/data
environment:
- POSTGRES_USER=chirpstack
- POSTGRES_PASSWORD=chirpstack
- POSTGRES_DB=chirpstack
networks:
- chirpstack-internal
redis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --save 300 1 --save 60 100 --appendonly no
volumes:
- chirpstack-redisdata:/data
networks:
- chirpstack-internal
mosquitto:
image: eclipse-mosquitto:2
restart: unless-stopped
volumes:
- ./configuration/mosquitto/config/:/mosquitto/config/
- chirpstack-mosquitto-data:/mosquitto/data
- chirpstack-mosquitto-log:/mosquitto/log
networks:
- chirpstack-internal
- smartcity-shared
volumes:
chirpstack-postgresqldata:
chirpstack-redisdata:
chirpstack-mosquitto-data:
chirpstack-mosquitto-log:
networks:
traefik-public:
external: true
smartcity-shared:
external: true
chirpstack-internal:
driver: bridge

View File

@@ -0,0 +1,78 @@
version: "3.8"
# =============================================================================
# The Things Stack LoRaWAN Network Server — Smart City Digital Twin
# =============================================================================
# Déploiement derrière Traefik avec sous-domaines dédiés
# Subdomaines:
# - tts.digitribe.fr → Console web (port 1885)
# - tts-api.digitribe.fr → REST API (port 1884)
# =============================================================================
services:
tts-postgres:
image: postgres:14
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=root
- POSTGRES_USER=root
- POSTGRES_DB=ttn_lorawan
volumes:
- tts-postgres-data:/var/lib/postgresql/data
networks:
- tts-internal
tts-redis:
image: redis:7
command: redis-server --appendonly yes
restart: unless-stopped
volumes:
- tts-redis-data:/data
networks:
- tts-internal
tts-stack:
image: thethingsnetwork/lorawan-stack:latest
entrypoint: ttn-lw-stack -c /config/ttn-lw-stack-docker.yml
command: start
restart: unless-stopped
depends_on:
- tts-redis
- tts-postgres
volumes:
- ./configuration/the-things-stack/config:/config:ro
- ./configuration/the-things-stack/blob:/srv/ttn-lorawan/public/blob
environment:
TTN_LW_BLOB_LOCAL_DIRECTORY: /srv/ttn-lorawan/public/blob
TTN_LW_REDIS_ADDRESS: tts-redis:6379
TTN_LW_IS_DATABASE_URI: postgres://root:***@tts-postgres:5432/ttn_lorawan?sslmode=disable
ports:
- "1700:1700/udp"
labels:
- "traefik.enable=true"
# Console web
- "traefik.http.routers.tts-console.rule=Host(`tts.digitribe.fr`)"
- "traefik.http.routers.tts-console.entrypoints=websecure"
- "traefik.http.routers.tts-console.tls.certresolver=letsencrypt"
- "traefik.http.services.tts-console.loadbalancer.server.port=1885"
# API REST
- "traefik.http.routers.tts-api.rule=Host(`tts-api.digitribe.fr`)"
- "traefik.http.routers.tts-api.entrypoints=websecure"
- "traefik.http.routers.tts-api.tls.certresolver=letsencrypt"
- "traefik.http.services.tts-api.loadbalancer.server.port=1884"
networks:
- traefik-public
- tts-internal
- smartcity-shared
volumes:
tts-postgres-data:
tts-redis-data:
networks:
traefik-public:
external: true
smartcity-shared:
external: true
tts-internal:
driver: bridge

File diff suppressed because it is too large Load Diff