{"action":"created","issue":{"url":"https://api.github.com/repos/jbenet/go-ipfs/issues/845","labels_url":"https://api.github.com/repos/jbenet/go-ipfs/issues/845/labels{/name}","comments_url":"https://api.github.com/repos/jbenet/go-ipfs/issues/845/comments","events_url":"https://api.github.com/repos/jbenet/go-ipfs/issues/845/events","html_url":"https://github.com/jbenet/go-ipfs/pull/845","id":59512539,"number":845,"title":"daemon: add options to set the API and GW addresses","user":{"login":"BenoitKnecht","id":1238084,"avatar_url":"https://avatars.githubusercontent.com/u/1238084?v=3","gravatar_id":"","url":"https://api.github.com/users/BenoitKnecht","html_url":"https://github.com/BenoitKnecht","followers_url":"https://api.github.com/users/BenoitKnecht/followers","following_url":"https://api.github.com/users/BenoitKnecht/following{/other_user}","gists_url":"https://api.github.com/users/BenoitKnecht/gists{/gist_id}","starred_url":"https://api.github.com/users/BenoitKnecht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenoitKnecht/subscriptions","organizations_url":"https://api.github.com/users/BenoitKnecht/orgs","repos_url":"https://api.github.com/users/BenoitKnecht/repos","events_url":"https://api.github.com/users/BenoitKnecht/events{/privacy}","received_events_url":"https://api.github.com/users/BenoitKnecht/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-02T17:22:36Z","updated_at":"2015-03-03T20:03:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jbenet/go-ipfs/pulls/845","html_url":"https://github.com/jbenet/go-ipfs/pull/845","diff_url":"https://github.com/jbenet/go-ipfs/pull/845.diff","patch_url":"https://github.com/jbenet/go-ipfs/pull/845.patch"},"body":"The ipfs daemon command lets you initialize the configuration with\r\ndefault parameters, but in certain situations (like starting ipfs daemon\r\nin a docker container), it would be convenient to be able to set the\r\nAPI and gateway addresses to something more meaningful.\r\n\r\nThis patch introduces two new options for the ipfs daemon command:\r\n-address-api and -address-gateway. When used together with -init, they\r\nset the respective addresses in the generated configuration file:\r\n\r\n  $ ipfs daemon -init -address-api=/ip4/0.0.0.0/tcp/5001 \\\r\n  -address-gateway=/ip4/0.0.0.0/tcp/8080\r\n\r\nWhen used without -init, they simply override value for that run of the\r\ndaemon, without overwriting it in the configuration file:\r\n\r\n  $ ipfs daemon -address-api=/ip4/0.0.0.0/tcp/5001 \\\r\n  -address-gateway=/ip4/0.0.0.0/tcp/8080"},"comment":{"url":"https://api.github.com/repos/jbenet/go-ipfs/issues/comments/77023026","html_url":"https://github.com/jbenet/go-ipfs/pull/845#issuecomment-77023026","issue_url":"https://api.github.com/repos/jbenet/go-ipfs/issues/845","id":77023026,"user":{"login":"BenoitKnecht","id":1238084,"avatar_url":"https://avatars.githubusercontent.com/u/1238084?v=3","gravatar_id":"","url":"https://api.github.com/users/BenoitKnecht","html_url":"https://github.com/BenoitKnecht","followers_url":"https://api.github.com/users/BenoitKnecht/followers","following_url":"https://api.github.com/users/BenoitKnecht/following{/other_user}","gists_url":"https://api.github.com/users/BenoitKnecht/gists{/gist_id}","starred_url":"https://api.github.com/users/BenoitKnecht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenoitKnecht/subscriptions","organizations_url":"https://api.github.com/users/BenoitKnecht/orgs","repos_url":"https://api.github.com/users/BenoitKnecht/repos","events_url":"https://api.github.com/users/BenoitKnecht/events{/privacy}","received_events_url":"https://api.github.com/users/BenoitKnecht/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T20:03:46Z","updated_at":"2015-03-03T20:03:46Z","body":"@jbenet Okay, but then it should also be unified between `daemon`, `init` and `config`, as they all offer different ways to alter the configuration file. I'll try and take a look at it over the week-end, and see if I can come up with something.\r\n\r\nIf anyone has suggestions, or wants to help me on this, don't hesitate."}}