# Docker Swarm data not persisting in Local

**URL:** <https://discuss.dgraph.io/t/docker-swarm-data-not-persisting-in-local/7267>\
**Category:** Users\
**Created:** [June 18, 2020, 2:00pm UTC](https://discuss.dgraph.io/t/docker-swarm-data-not-persisting-in-local/7267 "2020-06-18T14:00:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhijit-kar](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/abhijit-kar/32/3726_2.png) [@abhijit-kar](https://discuss.dgraph.io/u/abhijit-kar)\
**Post date:** [June 18, 2020, 2:00pm UTC](https://discuss.dgraph.io/t/docker-swarm-data-not-persisting-in-local/7267/1 "2020-06-18T14:00:17Z")

</div>

Hi Team,

I am posting here as a last resort after I was unable to figure out, how to persist whatever data I put into Dgraph.

For the last 3 days, I have been re-inserting data into the Dgraph after reinitializing the Docker Swarm cluster.

I have tried searching, but always end up with results like Gluster, Ceph, MinIO.

What am I doing wrong?

P.S. I use a slightly modified Docker Compose file from Dgraph GitHub repo.

---

<div class="post-metadata">

**Author:** ![minhaj](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/minhaj/32/3468_2.png) [@minhaj](https://discuss.dgraph.io/u/minhaj)\
**Post date:** [June 18, 2020, 2:01pm UTC](https://discuss.dgraph.io/t/docker-swarm-data-not-persisting-in-local/7267/2 "2020-06-18T14:01:57Z")

</div>

Hi @abhijit-kar Can you show us your modified docker-compose file.

---

<div class="post-metadata">

**Author:** ![abhijit-kar](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/abhijit-kar/32/3726_2.png) [@abhijit-kar](https://discuss.dgraph.io/u/abhijit-kar)\
**Post date:** [June 18, 2020, 2:03pm UTC](https://discuss.dgraph.io/t/docker-swarm-data-not-persisting-in-local/7267/3 "2020-06-18T14:03:03Z")

</div>

[docker-compose.yaml](https://discuss.dgraph.io/uploads/short-url/alzcWQxtO7hvtSINvghJ6FMCFE.yaml) (780 Bytes)

I just removed high availability constraints from it!

Referenced it from: [dgraph/contrib/config/docker/docker-compose-ha.yml at master · dgraph-io/dgraph · GitHub](https://github.com/dgraph-io/dgraph/blob/master/contrib/config/docker/docker-compose-ha.yml)

---

<div class="post-metadata">

**Author:** ![gja](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/gja/32/2654_2.png) [@gja](https://discuss.dgraph.io/u/gja)\
**Post date:** [June 18, 2020, 4:38pm UTC](https://discuss.dgraph.io/t/docker-swarm-data-not-persisting-in-local/7267/4 "2020-06-18T16:38:18Z")

</div>

Hi @abhijit-kar

> [@abhijit-kar](#):
>
> I have been re-inserting data into the Dgraph after reinitializing the Docker Swarm cluster.

You need to put a volume mount at the /dgraph location within the docker container. Add a volume for alpha and a separate volume for zero, and mount them both at /dgraph in the respective container.

I see a /honeycomb, but I’m not sure what that is used for. If this is the data directory, you have to ensure that you pass options to dgraph to start with that data directory.

---

<div class="post-metadata">

**Author:** ![abhijit-kar](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/abhijit-kar/32/3726_2.png) [@abhijit-kar](https://discuss.dgraph.io/u/abhijit-kar)\
**Post date:** [June 18, 2020, 5:18pm UTC](https://discuss.dgraph.io/t/docker-swarm-data-not-persisting-in-local/7267/5 "2020-06-18T17:18:36Z")

</div>

I was learning Docker Swarm, and just assumed I could change volume mount to any name.

In this case, from /dgraph to /honeycomb.

Thank you for clearing that up.
