{"action":"opened","issue":{"url":"https://api.github.com/repos/mongodb-labs/mongo-connector/issues/516","repository_url":"https://api.github.com/repos/mongodb-labs/mongo-connector","labels_url":"https://api.github.com/repos/mongodb-labs/mongo-connector/issues/516/labels{/name}","comments_url":"https://api.github.com/repos/mongodb-labs/mongo-connector/issues/516/comments","events_url":"https://api.github.com/repos/mongodb-labs/mongo-connector/issues/516/events","html_url":"https://github.com/mongodb-labs/mongo-connector/issues/516","id":174831927,"number":516,"title":"Combining options from CLI & config file","user":{"login":"letsgolesco","id":3138141,"avatar_url":"https://avatars.githubusercontent.com/u/3138141?v=3","gravatar_id":"","url":"https://api.github.com/users/letsgolesco","html_url":"https://github.com/letsgolesco","followers_url":"https://api.github.com/users/letsgolesco/followers","following_url":"https://api.github.com/users/letsgolesco/following{/other_user}","gists_url":"https://api.github.com/users/letsgolesco/gists{/gist_id}","starred_url":"https://api.github.com/users/letsgolesco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsgolesco/subscriptions","organizations_url":"https://api.github.com/users/letsgolesco/orgs","repos_url":"https://api.github.com/users/letsgolesco/repos","events_url":"https://api.github.com/users/letsgolesco/events{/privacy}","received_events_url":"https://api.github.com/users/letsgolesco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-02T19:28:53Z","updated_at":"2016-09-02T19:28:53Z","closed_at":null,"body":"There are a number of options under `docManagers` that can only be set via config file. For example, my target is an Elasticsearch instance and I want to pass in `docManagers.0.args.clientOptions.timeout = 100`.\r\n\r\nMy use case involves environment variables specifying the `mainAddress` (`--main`) and `docManagers.0.targetURL` (`--target-url`) options, and I pass them to mongo-connector via CLI options.\r\n\r\nHowever, I noticed that when doing this, the `docManagers` options in my config file are ignored (my timeout remains at the default value 10, even though I've set it to 100).\r\n\r\nI'd like to know if:\r\n1. Can the config JSON file use environment variables?\r\n2. Can we reliably combine options passed via CLI with those passed via config JSON file (specifically for `docManagers.0`)?\r\n\r\nMy last resort option here is to write separate config files for each environment, which is possible but not ideal."}}
{"actor":{"display_login":"letsgolesco"}}