{"action":"created","issue":{"url":"https://api.github.com/repos/docker-library/postgres/issues/75","labels_url":"https://api.github.com/repos/docker-library/postgres/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/docker-library/postgres/issues/75/comments","events_url":"https://api.github.com/repos/docker-library/postgres/issues/75/events","html_url":"https://github.com/docker-library/postgres/pull/75","id":96908506,"number":75,"title":"Improve initdb logic to properly source *.sql files as well, without the use of --single","user":{"login":"tianon","id":161631,"avatar_url":"https://avatars.githubusercontent.com/u/161631?v=3","gravatar_id":"","url":"https://api.github.com/users/tianon","html_url":"https://github.com/tianon","followers_url":"https://api.github.com/users/tianon/followers","following_url":"https://api.github.com/users/tianon/following{/other_user}","gists_url":"https://api.github.com/users/tianon/gists{/gist_id}","starred_url":"https://api.github.com/users/tianon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianon/subscriptions","organizations_url":"https://api.github.com/users/tianon/orgs","repos_url":"https://api.github.com/users/tianon/repos","events_url":"https://api.github.com/users/tianon/events{/privacy}","received_events_url":"https://api.github.com/users/tianon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-07-23T21:23:28Z","updated_at":"2015-07-27T21:42:55Z","closed_at":"2015-07-24T17:58:29Z","pull_request":{"url":"https://api.github.com/repos/docker-library/postgres/pulls/75","html_url":"https://github.com/docker-library/postgres/pull/75","diff_url":"https://github.com/docker-library/postgres/pull/75.diff","patch_url":"https://github.com/docker-library/postgres/pull/75.patch"},"body":"`postgres --single` already has a lot of quirks, but is also discouraged for use by upstream (although why that fact isn't included prominently in the documentation for single-user mode, I have no idea -- it seems like an important bit to point out).\r\n\r\nThis mimics the server startup logic in https://github.com/docker-library/mysql/pull/53 to give us \"proper\" PostgreSQL server access, while also setting `listen_addresses` to the empty string to prevent remote connections during our initialization process."},"comment":{"url":"https://api.github.com/repos/docker-library/postgres/issues/comments/125350741","html_url":"https://github.com/docker-library/postgres/pull/75#issuecomment-125350741","issue_url":"https://api.github.com/repos/docker-library/postgres/issues/75","id":125350741,"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":"2015-07-27T21:42:55Z","updated_at":"2015-07-27T21:42:55Z","body":"If you need to do things before the postgres server is running, you could make a new entrypoint script that does your restore and then `exec`s to the regular entrypoint script.  You would probably lose the ability to make a user by the environment vars, but you probably overwrite that in you database backup anyhow."}}