MiravoMiravo

Docker

Run Miravo in Docker with published images, port mappings, writable state, health probes, and protocol ports for repeatable local environments.

Images

RegistryImage
Docker Hubamineamaach/miravo:latest
GitHub Container Registryghcr.io/amine-amaach/miravo:latest

Pin a release tag when the deployment needs a fixed version.

Run in a container

# Start 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 --opcua

Port binding

Host ports must stay free. Change the left side of -p or ports: when 1883, 4840, 1502, or 8080 already belongs to another process.

Docker Compose

services:
  miravo:
    image: amineamaach/miravo:latest
    init: true
    command: ["--log-format", "json", "start"]
    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

PortSurfacePurpose
1883MQTTEmbedded broker when MQTT stays enabled
4840OPC UAOPC UA server when --opcua is enabled
1502Modbus TCPModbus server when --modbus is enabled
8080HTTPAdmin API, embedded Console, /api/healthz, /api/readyz

Volumes and state

Host concernContainer setting
Persist runtime state and personal environmentsMount a writable directory and set MIRAVO_HOME to that mount
Override runtime defaultsSet MIRAVO_* and LITMUS_EDGE_* variables in environment: or -e
Run custom environmentsMount the environment folder and point --template at the mounted .miravo.yaml path
volumes:
  - ./miravo-data:/data/miravo
  - ./packaging-line:/envs/packaging-line:ro
environment:
  MIRAVO_HOME: /data/miravo
  MIRAVO_TEMPLATE: /envs/packaging-line/packaging-line.miravo.yaml

Health probes

EndpointPurposeHealthy when
GET /api/healthzLivenessEngine is running and the tick loop is advancing
GET /api/readyzReadinessEngine is running and each enabled adapter reports ready
livenessProbe:
  httpGet:
    path: /api/healthz
    port: 8080
readinessProbe:
  httpGet:
    path: /api/readyz
    port: 8080

Reference

ItemValue
Default commandstart
Writable state pathMIRAVO_HOME inside the container
Default admin bind0.0.0.0:8080 in the Docker image
Read-only root supportYes, when /tmp and MIRAVO_HOME stay writable
Standard Modbus/TCP port502 when explicitly mapped or configured
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:latest

Next

Was this page useful?

Last updated on