I am running an instance of RabbitMQ on my edge devices and want to persist data between deployments.
A common practice to persist data across deployments is to map a directory from the host, into a directory where the service is saving / backing up data to disk. In the case of RabbitMQ, this is dependent on the hostname of the docker container. To get around this issue, one has to set the hostname of the instance as described in this article:
https://www.futurefundamentals.com/set-rabbitmq-with-data-persistent-with-docker-compose/
The IoT Edge documentation suggests to use information found by inspecting the docker container and copy parts of this into the deployment.template.json file for IoT Edge to apply to a container in deployment:
https://video2.skills-academy.com/en-us/azure/iot-edge/how-to-use-create-options?view=iotedge-1.5
However, it does not describe how to set the hostname of a docker container that will be deployed.
I have tried a few different configurations like the one pasted below, to see if I could magically just set the hostname, but without succes.
I expect to be able to solve this issue by making a script that looks for a preexisting folder-structure in the data folder of RabbitMQ and then renames to fit the current hostname, but I would prefer the more elegant solution of just setting the hostname of the docker instance.
Thanks in advance! :-)