fix: docker compose network config so that containers may communicate

MQTT from gateway stack and app must be on the same network
It was implied when they were from the same stack, but when splitting
docker creates two default separated networks
This commit creates a network for MQTT and makes the app join it

Works only if the two stacks are on the same host (which is the case
during development)
This commit is contained in:
Alexis Fourmaux 2026-05-08 12:38:40 +02:00
parent 416a76e9f0
commit bdfe1a5f00
2 changed files with 28 additions and 3 deletions

View file

@ -1,4 +1,10 @@
services:
consumer:
build: ./consumer
restart: unless-stopped
restart: unless-stopped
networks:
- lora-gateway_mqtt
networks:
lora-gateway_mqtt:
external: true