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

Set secret and api key with env #254

Closed
sj26 opened this issue Dec 19, 2018 · 4 comments
Closed

Set secret and api key with env #254

sj26 opened this issue Dec 19, 2018 · 4 comments

Comments

@sj26
Copy link

sj26 commented Dec 19, 2018

Please support setting secret and api_key from ENV. This allows running the unmodified official centrifugo docker image in fargate by loading CENTRIFUGO_SECRET and CENTRIFUGO_API_KEY from ssm parameter store secrets. It would be nice if pretty much all config variables and command line arguments could be set with env.

At the moment I'll have to bake a new docker image around the official image which adds an s3 client and downloads a config file in an entrypoint which is a bit yuck.

(I'd be happy to contribute a PR if you'd be interested in this feature.)

@FZambia
Copy link
Member

FZambia commented Dec 19, 2018

Yes, this is reasonable, I've just added support for setting api_key via env var in 683befc.

Setting secret already possible with CENTRIFUGO_SECRET.

Here is a list of options Centrifugo supports setting over env vars:

bindEnvs := []string{

If you need some option that is not currently in list we can add it too. Maybe it's a bit hard for namespaces option because it's currently an array but I suppose there could be some workaround.

@sj26
Copy link
Author

sj26 commented Dec 21, 2018

That's wonderful, thank you!

It would be great to be able to configure ports and tls through env as well.

@FZambia
Copy link
Member

FZambia commented Dec 21, 2018

OK, will add very soon or just send pr :)

@sj26
Copy link
Author

sj26 commented Dec 23, 2018

🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants