UMH in Docker environment variables
# umh-support
b
What are the environment variables for configuring the mqtt broker, and the devices' IP for the docker edition? Trying to configure instances with docker compose. What I've noticed is that everytime I restart the compose, it drops the mqtt broker and the device IP in the instances settings.
Copy code
umh:
    image: management.umh.app/oci/united-manufacturing-hub/umh-in-docker:latest
    container_name: umh
    environment:
      MGMT_CUSTOM_URL: "https://management.umh.app"
      MGMT_AUTH_TOKEN: "<REDACTED>"
      KUBE_NODE_NAME: "<REDACTED>"
      MGMT_CUSTOM_IMAGE_VERSION: "0.5.33"
      IS_LITE_INSTALL: "true"
      LOCATION_ENTERPRISE: "MACH-Controls-LLC"
      LOCATION_SITE: "Sylvania"
      LOCATION_AREA: "Office"
      LOCATION_LINE: "Demo-Box-310"
    privileged: true
    restart: always
    pull_policy: always
j
UMH in Docker is exactly what it sounds like: the normal UMH with Kubernetes in Docker. Therefore, it also saves its configuration inside of the docker container. If you don’t have a volume, this is then overwritten. The MQTT IP is such a config option. What you could do is mount the entire mgmt companion config into the Docker container itself. There is upon startup this code: ‘’’ # Download manifests into /var/lib/rancher/k3s/server/manifests/ # For the configmap only download if it does not exist yet # so that the user can mount his own configmap from a volume if [ ! -f "$MANIFESTS_DIR/configmap.yaml" ]; then /bin/curl --create-dirs -L "$CONFIGMAP_URL" -o "$MANIFESTS_DIR/configmap.yaml" else echo "Configmap.yaml already exists. Skipping download." fi
2 Views