cptactionhank / docker-atlassian-jira-software

Atlassian JIRA Software wrapped in a Docker image
https://cptactionhank.github.io/docker-atlassian-jira-software
MIT License
267 stars 165 forks source link

Container should survive restart #50

Open rubiktubik opened 5 years ago

rubiktubik commented 5 years ago

Hi, awesome docker-image! But i need to mount the jira specific folders so that if the container is restarted all data is not lost.

How do you handle persistent data? Some data is in the DB but if i restart the container i need to configure it again. And my previous data seems lost.

Regards rubiktubik

viceice commented 5 years ago

You have to mount a local folder or a docker volume.

https://github.com/cptactionhank/docker-atlassian-jira-software/blob/0128d65463dc594292d1ad3c38d55f745deaa7d9/Dockerfile#L41-L44

rubiktubik commented 5 years ago

This setting is the default or i'am wrong? When i restart the container i need to do the setup again.

viceice commented 5 years ago

By default, docker will assing only temporary volumes, wich will be deleted after container recreation. If you only restart, aka docker restart jira, then the data will survive.

So, if you want to retain the data, you have to explicitly mount a local folder or a docker volume. See https://docs.docker.com/engine/reference/run/#volume-shared-filesystems