Simulator: use localhost URLs for Fiware brokers (Orion:2026, Stellio:8080)
This commit is contained in:
17
simulator.py
17
simulator.py
@@ -443,19 +443,14 @@ class MultiMQTT:
|
||||
# =============================================================================
|
||||
# URLs de base (résolues au démarrage)
|
||||
# =============================================================================
|
||||
ORION_HOST = "fiware-gis-quickstart-orion-1"
|
||||
ORION_IP = ""
|
||||
try:
|
||||
import socket
|
||||
ORION_IP = socket.gethostbyname(ORION_HOST)
|
||||
except:
|
||||
pass
|
||||
ORION_URL = f"http://{ORION_IP or ORION_HOST}:1026" if ORION_IP else "http://fiware-gis-quickstart-orion-1:1026"
|
||||
STELLIO_URL = os.environ.get("STELLIO_URL", "http://stellio-api-gateway:8080")
|
||||
ORION_HOST = "localhost"
|
||||
ORION_PORT = "2026"
|
||||
ORION_URL = f"http://{ORION_HOST}:{ORION_PORT}"
|
||||
STELLIO_URL = os.environ.get("STELLIO_URL", "http://localhost:8080") # Stellio API Gateway (à exposer)
|
||||
# Configuration OpenRemote (URLs dynamiques)
|
||||
OR_URL = os.environ.get("OR_URL", "http://openremote-manager-1:8080") # Hostname Docker interne
|
||||
OR_URL = os.environ.get("OR_URL", "http://localhost:8080") # OpenRemote Manager (Traefik)
|
||||
OR_REALM = os.environ.get("OR_REALM", "smartcity") # Default: smartcity
|
||||
OR_TOKEN_URL = os.environ.get("OR_TOKEN_URL", f"http://openremote-keycloak-1:8080/auth/realms/{OR_TOKEN_REALM}/protocol/openid-connect/token")
|
||||
OR_TOKEN_URL = os.environ.get("OR_TOKEN_URL", "http://localhost:8080/auth/realms/{OR_REALM}/protocol/openid-connect/token")
|
||||
OR_TOKEN_TTL = int(os.environ.get("OR_TOKEN_TTL", "3600")) # Refresh token every hour
|
||||
STELLIO_TENANT = os.environ.get("STELLIO_TENANT", "urn:ngsi-ld:tenant:default")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user