Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ We provide some gateway configuration examples. These are listed below:
| Configuration | Purpose | Link |
| ------------- | ---- | --- |
|Single transport | A simple use case with a single sink and a single transport | [Single transport](./single_transport/docker-compose.yml) |
|Single transport with local MQTT | Single transport configuration with a local MQTT broker | [Single transport with local MQTT](./single_transport_local_mqtt/docker-compose.yml) |
| Dual transport | Use case with two transports to route traffic from selected endpoints to two distinct backends. This can be used for instance to route traffic from an application to a customer backend and diagnostic traffic to WNT | [Dual transport](./dual_transport/docker-compose.yml) |

All the example templates provided (docker-compose.yml) can be updated to fit your environment.
Expand Down
11 changes: 11 additions & 0 deletions docker/docker-compose/single_transport_local_mqtt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Single transport with local MQTT broker example

This example is based on the [single transport example](../single_transport/README.md).
The configuration instructions from single transport can be followed. In this
example, the MQTT broker is added to the docker compose file as a container, so
you don't have to set up and configure an MQTT broker separately.

The MQTT broker is configured insecurely, therefore this example is mainly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it should be stipulated also that it is a very particular setup.

In fact, it only allows a single gateway in a network. It is good for prototyping but not a real use case.

intended for quickly setting up a gateway for development purposes. The broker
can be reached from TCP port 1883 and via websockets on port 9001.

Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
volumes:
dbus-volume:

services:
dbus-service:
image: wirepas/gateway_dbus_service:${GATEWAY_TAG:-latest}
container_name: dbus
restart: always
volumes:
- type: volume
source: dbus-volume
target: /var/run/dbus
logging:
driver: journald


transport-service:
image: wirepas/gateway_transport_service:${GATEWAY_TAG:-latest}
container_name: transport-service
environment:
WM_SERVICES_MQTT_HOSTNAME: "mqtt-broker"
WM_SERVICES_MQTT_PORT: "1883"
WM_SERVICES_MQTT_FORCE_UNSECURE: "True"
# To be modified
WM_GW_ID:
WM_GW_MODEL:
WM_GW_VERSION:
restart: always
depends_on:
- dbus-service
- mqtt-broker
volumes:
- type: volume
source: dbus-volume
target: /var/run/dbus
logging:
driver: journald


sink-service:
image: wirepas/gateway_sink_service:${GATEWAY_TAG:-latest}
container_name: sink-service
restart: on-failure
depends_on:
- dbus-service
devices:
# To be modified
- <path to from_host>:/dev/mysink
environment:
WM_GW_SINK_BAUDRATE:
WM_GW_SINK_ID:
# Do not change (path of sink in container)
WM_GW_SINK_UART_PORT: /dev/mysink
volumes:
- type: volume
source: dbus-volume
target: /var/run/dbus
logging:
driver: journald


mqtt-broker:
image: eclipse-mosquitto:latest
container_name: mqtt-broker
restart: on-failure
volumes:
- type: bind
source: mosquitto_config/
target: /mosquitto/config/
ports:
- "1883:1883/tcp"
- "9001:9001/tcp"
logging:
driver: journald

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
listener 1883

listener 9001
protocol websockets

allow_anonymous true