Docker
Run Miravo in Docker: published images, ports, writable state, health probes, and Compose.
Images
| Registry | Image |
|---|---|
| Docker Hub | amineamaach/miravo:latest |
| GitHub Container Registry | ghcr.io/amine-amaach/miravo:latest |
Pin a release tag if you need a fixed version.
Run in a container
# Start the default template with MQTT and the admin API
docker run --rm -p 1883:1883 -p 8080:8080 amineamaach/miravo:latest# Start with OPC UA and a specific template
docker run --rm -p 1883:1883 -p 4840:4840 -p 8080:8080 \
-e MIRAVO_TEMPLATE=water-treatment \
-e MIRAVO_NAME=plant-a \
amineamaach/miravo:latest start --opcuaPort binding
Host ports must be free. If 1883, 4840, 1502, or 8080 is already in
use, change the left side of -p or ports:.
Docker Compose
services:
miravo:
image: amineamaach/miravo:latest
init: true
command: ["start", "--log-format", "json"]
environment:
MIRAVO_ADMIN_PORT: 8080
MIRAVO_HOME: /data/miravo
ports:
- "1883:1883"
- "8080:8080"
volumes:
- ./miravo-data:/data/miravo
read_only: true
tmpfs:
- /tmp:size=256m
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
stop_grace_period: 30s
healthcheck:
test:
[
"CMD-SHELL",
"wget -qO- http://127.0.0.1:8080/api/healthz > /dev/null || exit 1",
]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
restart: "on-failure:5"Ports
| Port | Surface | Purpose |
|---|---|---|
1883 | MQTT | Embedded broker, unless you pass --no-mqtt |
4840 | OPC UA | OPC UA server, when enabled with --opcua or by the template |
1502 | Modbus TCP | Modbus server, when enabled with --modbus or by the template |
8080 | HTTP | Admin API, embedded Console, /api/healthz, /api/readyz |
The image binds every listener to 0.0.0.0 inside the container. To keep a port local to the host, publish it with 127.0.0.1: (-p 127.0.0.1:1883:1883). See Security.
Volumes and state
| Host concern | Container setting |
|---|---|
| Keep runtime state and personal template bundles | Mount a writable directory and set MIRAVO_HOME to it |
| Change runtime defaults | Set MIRAVO_* and LITMUS_EDGE_* variables in environment: or with -e |
| Run your own template | Mount the template bundle and point --template or MIRAVO_TEMPLATE at its .miravo.yaml |
volumes:
- ./miravo-data:/data/miravo
- ./packaging-line:/envs/packaging-line:ro
environment:
MIRAVO_HOME: /data/miravo
MIRAVO_TEMPLATE: /envs/packaging-line/packaging-line.miravo.yamlHealth probes
| Endpoint | Purpose | Healthy when |
|---|---|---|
GET /api/healthz | Liveness | Engine is running and the tick loop is advancing |
GET /api/readyz | Readiness | Engine is running and each enabled adapter reports ready |
livenessProbe:
httpGet:
path: /api/healthz
port: 8080
readinessProbe:
httpGet:
path: /api/readyz
port: 8080Reference
| Item | Value |
|---|---|
| Default command | start |
| Writable state path | MIRAVO_HOME inside the container |
| Default admin bind | 0.0.0.0:8080 in the Docker image |
| Read-only root filesystem | Works if /tmp and MIRAVO_HOME are writable |
| Standard Modbus/TCP port | 502, only if you map or configure it |
docker run --rm \
-e MIRAVO_ADMIN_PORT=9090 \
-e MIRAVO_MQTT_PORT=1884 \
-e MIRAVO_NAME=demo \
-p 1884:1884 -p 9090:9090 \
amineamaach/miravo:latestNext
CLI ⭢ miravo start
Flags and command behavior.
Environment variables
MIRAVO_* and LITMUS_EDGE_* defaults.
Logging
Plain output and JSON output for container logs.
Admin API
The health and control endpoints behind port 8080.
Was this page useful?
Last updated on
Miravo