# Deployed flow in Azure Container Instances disappears

**URL:** https://discourse.nodered.org/t/deployed-flow-in-azure-container-instances-disappears/34618
**Category:** General
**Created:** [21 October 2020 06:59 UTC](https://discourse.nodered.org/t/deployed-flow-in-azure-container-instances-disappears/34618 "2020-10-21T06:59:57Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![janvda](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/janvda/32/234_2.png) [@janvda](https://discourse.nodered.org/u/janvda)
#### Post date: [21 October 2020 15:15 UTC](https://discourse.nodered.org/t/deployed-flow-in-azure-container-instances-disappears/34618/6 "2020-10-21T15:15:01Z")

</div>

> [@tobiaspe](#):
>
> Without warning though, at some time, the deployed flows are all deleted, likely because the container restarted and pulled the Node-Red image automatically again.

I did some further digging in the azure documentation:

- [Manually stop or start container group - Azure Container Instances | Microsoft Learn](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-stop-start)

So when you stop your container group it recycles everything - so the container state is not preserved.  
So if flows are stored in the writable container layer they are all lost.

When restarting a container it will pull a new image if the container image is updated which most likely is the case as recently a new node-red image version is available on docker hub.  
So this new image, will complete replace the old image including the writable container layer containing the flows you have stored there.

> [@tobiaspe](#):
>
> How can I keep my flows intact? Do I have to create Container Groups in order to make this more stable?

To overcome this you must assure that the flows are not stored in the writable container layer but outside the container in a volume.

So for this you need to

1. create an Azure file share:  
[Mount Azure Files volume to container group - Azure Container Instances | Microsoft Learn](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files)
2. mount the Azure file share as a volume in the container with mount path `/data`

---

_[View the full topic](https://discourse.nodered.org/t/deployed-flow-in-azure-container-instances-disappears/34618)._
