{"action":"closed","issue":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/1042","repository_url":"https://api.github.com/repos/RocketChat/Rocket.Chat","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/1042/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/1042/comments","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/1042/events","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/1042","id":110332754,"number":1042,"title":"Data persistance","user":{"login":"royalaid","id":2439803,"avatar_url":"https://avatars.githubusercontent.com/u/2439803?v=3","gravatar_id":"","url":"https://api.github.com/users/royalaid","html_url":"https://github.com/royalaid","followers_url":"https://api.github.com/users/royalaid/followers","following_url":"https://api.github.com/users/royalaid/following{/other_user}","gists_url":"https://api.github.com/users/royalaid/gists{/gist_id}","starred_url":"https://api.github.com/users/royalaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/royalaid/subscriptions","organizations_url":"https://api.github.com/users/royalaid/orgs","repos_url":"https://api.github.com/users/royalaid/repos","events_url":"https://api.github.com/users/royalaid/events{/privacy}","received_events_url":"https://api.github.com/users/royalaid/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels/feat:%20docker","name":"feat: docker","color":"207de5"},{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels/subj:%20deployment","name":"subj: deployment","color":"5319e7"},{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels/type:%20improvement","name":"type: improvement","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-07T22:41:01Z","updated_at":"2016-05-12T02:11:48Z","closed_at":"2016-05-12T02:11:48Z","body":"As currently stands the default setup for the mongodb docker image relies on storing the journal within the container. This method of storing data for a database is generally frowned upon because all backend data gets wiped when I remove the container. A simple solution would be to provide a default setup using docker's builtin volumes mechanism by adding:\r\n```yml\r\nmongodb:\r\n    image: mongo\r\n    ports:\r\n        - 27017\r\n    volumes:\r\n        - /data/db\r\n```\r\nto the docker-compose.yml or a similar statement to the Dockerfile. By doing moving mongodb's storage location to the host a update can be applied by simply running \r\n```bash\r\ndocker-compose stop && docker-compose rm\r\ndocker-compose pull && docker-compose up\r\n```\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27244859-data-persistance?utm_campaign=plugin&utm_content=tracker%2F16890630&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F16890630&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}