Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configuration via command line arguments #79

Closed
magiconair opened this issue Apr 9, 2016 · 0 comments
Closed

Support configuration via command line arguments #79

magiconair opened this issue Apr 9, 2016 · 0 comments
Milestone

Comments

@magiconair
Copy link
Contributor

PR #63 spawned the discussion on supporting command line arguments in addition to environment variables. The suggested approach was to use github.com/spf13/viper also to reduce the amount of homegrown code.

The PR requires updates to two other projects which all have not been merged yet and adds three more libraries to the code. Also or because of this, the PR has been stale for a couple of weeks now. However, credit for the idea and the motivation belongs to @doublerebel.

I like the idea of supporting command line arguments and came up with an implementation that uses the flag.FlagSet from the Go standard library to achieve the same thing. All values can now be set either via command line, environment or properties. Environment variables are case insensitive and support an optional FABIO_ prefix. So both PROXY_ADDR and FABIO_PROXY_ADDR are valid but the FABIO_ prefixed values are preferred.

As an added bonus the github.com/magiconair/properties library was updated to 1.7.0 which now supports loading properties files from URLs.

magiconair added a commit that referenced this issue Apr 9, 2016
* support cmdline, env vars and properties
* support env vars with and without a FABIO_ prefix
* support loading properties from URL

Inspired by PR #63 from @doublerebel
magiconair added a commit that referenced this issue Apr 9, 2016
* support cmdline, env vars and properties
* support env vars with and without a FABIO_ prefix
* support loading properties from URL
* support consul agent on https

Inspired by PR #63 from @doublerebel
magiconair added a commit that referenced this issue May 17, 2016
* support cmdline, env vars and properties
* support env vars with and without a FABIO_ prefix
* support loading properties from URL
* support consul agent on https

Inspired by PR #63 from @doublerebel
magiconair added a commit that referenced this issue May 17, 2016
* support cmdline, env vars and properties
* support env vars with and without a FABIO_ prefix
* support loading properties from URL
* support consul agent on https

Inspired by PR #63 from @doublerebel
magiconair added a commit that referenced this issue May 29, 2016
* support cmdline, env vars and properties
* support env vars with and without a FABIO_ prefix
* support loading properties from URL
* support consul agent on https

Inspired by PR #63 from @doublerebel
magiconair added a commit that referenced this issue Jun 8, 2016
* support cmdline, env vars and properties
* support env vars with and without a FABIO_ prefix
* support loading properties from URL
* support consul agent on https

Inspired by PR #63 from @doublerebel
magiconair added a commit that referenced this issue Jun 15, 2016
* support cmdline, env vars and properties
* support env vars with and without a FABIO_ prefix
* support loading properties from URL
* support consul agent on https

Inspired by PR #63 from @doublerebel
@magiconair magiconair added this to the 1.2 milestone Jun 21, 2016
magiconair added a commit that referenced this issue Jul 12, 2016
* support cmdline, env vars and properties
* support env vars with and without a FABIO_ prefix
* support loading properties from URL
* support consul agent on https

Inspired by PR #63 from @doublerebel
magiconair added a commit that referenced this issue Jul 16, 2016
* Issue #27: Add/remove certificates using API
* Issue #28: Refactor listener config
* Issue #70: SSL Certs from Vault
* Issue #79: Refactor config loading to use flag sets
* Issue #85: SNI Support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant