feat: advertise mqtt broker, localiserd via mdns

This commit is contained in:
2026-05-12 15:13:38 +02:00
parent 43f42f65d8
commit 51e2cec7a8
3 changed files with 25 additions and 1 deletions
+22
View File
@@ -16,3 +16,25 @@ config :localiserd, Localiser.Web.Endpoint,
config :localiserd, :jwt_secret,
System.get_env("JWT_SECRET") || "localiser_dev_jwt_secret_change_in_prod!!"
config :mdns_lite,
hosts: ["localiser"],
ttl: 120,
services: [
# advertise this service on the local network for auto-discovery by clients
%{
id: :localiserd,
protocol: "localiserd",
transport: "tcp",
# todo: grab port from config
port: 4000
},
# also advertise the MQTT broker for direct discovery by new sensors
%{
id: :mqtt,
protocol: "mqtt",
transport: "tcp",
port: Application.compile_env(:localiser, :mqtt_port, 1883)
}
]