{"action":"created","issue":{"url":"https://api.github.com/repos/docker-library/postgres/issues/190","repository_url":"https://api.github.com/repos/docker-library/postgres","labels_url":"https://api.github.com/repos/docker-library/postgres/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/docker-library/postgres/issues/190/comments","events_url":"https://api.github.com/repos/docker-library/postgres/issues/190/events","html_url":"https://github.com/docker-library/postgres/issues/190","id":173506482,"number":190,"title":"How to make persistent storage with docker-compose up-down-up?","user":{"login":"capital-boss","id":15030529,"avatar_url":"https://avatars.githubusercontent.com/u/15030529?v=3","gravatar_id":"","url":"https://api.github.com/users/capital-boss","html_url":"https://github.com/capital-boss","followers_url":"https://api.github.com/users/capital-boss/followers","following_url":"https://api.github.com/users/capital-boss/following{/other_user}","gists_url":"https://api.github.com/users/capital-boss/gists{/gist_id}","starred_url":"https://api.github.com/users/capital-boss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capital-boss/subscriptions","organizations_url":"https://api.github.com/users/capital-boss/orgs","repos_url":"https://api.github.com/users/capital-boss/repos","events_url":"https://api.github.com/users/capital-boss/events{/privacy}","received_events_url":"https://api.github.com/users/capital-boss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-26T17:46:16Z","updated_at":"2016-08-26T18:33:02Z","closed_at":null,"body":"I have a multiple container application, that is using the postgres image in docker-compose.yml file. Postgres container has volume on host machine for persistent storage.\r\n\r\nWhen I run `docker-compose up  ` at first time all is fine, postgres creates db files in my host folder.\r\nAfter it I need to shut down application temporarily  with  `docker-compose down  ` if I'll change code of web container.\r\n\r\nWhen I run    `docker-compose up  ` second time, postgres overwriting all db files, but I need that data not changes. How can I solve this issue? "},"comment":{"url":"https://api.github.com/repos/docker-library/postgres/issues/comments/242815555","html_url":"https://github.com/docker-library/postgres/issues/190#issuecomment-242815555","issue_url":"https://api.github.com/repos/docker-library/postgres/issues/190","id":242815555,"user":{"login":"yosifkit","id":896423,"avatar_url":"https://avatars.githubusercontent.com/u/896423?v=3","gravatar_id":"","url":"https://api.github.com/users/yosifkit","html_url":"https://github.com/yosifkit","followers_url":"https://api.github.com/users/yosifkit/followers","following_url":"https://api.github.com/users/yosifkit/following{/other_user}","gists_url":"https://api.github.com/users/yosifkit/gists{/gist_id}","starred_url":"https://api.github.com/users/yosifkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yosifkit/subscriptions","organizations_url":"https://api.github.com/users/yosifkit/orgs","repos_url":"https://api.github.com/users/yosifkit/repos","events_url":"https://api.github.com/users/yosifkit/events{/privacy}","received_events_url":"https://api.github.com/users/yosifkit/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T18:33:02Z","updated_at":"2016-08-26T18:33:02Z","body":"If your volume is defined as `/some/local/dir/:/var/lib/postgresql/data/` then the [entrypoint script should not initialize](https://github.com/docker-library/postgres/blob/fc36c25f8ac352f1fea6d0e7cf8d9bd92a4e720f/docker-entrypoint.sh#L17) it again.\r\n\r\nCan you share some of your postgres config in the compose yaml file?"}}
{"actor":{"display_login":"yosifkit"}}