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

Redis Connections settings are not configurable via environment variables #81

Closed
oddurmagg opened this issue Mar 13, 2016 · 7 comments
Closed

Comments

@oddurmagg
Copy link

When deploying centrifugo as a docker container, it is preferable to be able to define which redis server to connect to via an environment variable.

By binding the redis_host to an environment variable in main.go this would be possible.

viper.BindEnv("redis_host")

@oddurmagg
Copy link
Author

There seems to be a workaround in #21

@FZambia
Copy link
Member

FZambia commented Mar 13, 2016

Hello @oddurmagg , does that workaround work fine for your case? If having environment variable is more convenient for you - I can add it in next release.

@oddurmagg
Copy link
Author

It makes me have to jump through hoops in the dockerfile where I need to pass the environment variable to the command line. And the docker CMD does not do enviroment variable expansion by default, so I need to invoke sh and through that invoke the actual binary.

see: https://docs.docker.com/engine/reference/builder/#cmd

Reading it in like all the other environment variables is much cleaner and I would prefer that.

@FZambia
Copy link
Member

FZambia commented Mar 13, 2016

Ok! Added in 9c3942b. I am planning to finish #73 and then make new release - hopefully during this week.

@oddurmagg
Copy link
Author

Awesome ! Thanks

@FZambia
Copy link
Member

FZambia commented Mar 22, 2016

@oddurmagg unfortunately still can not release new version, because I want to include 2 pull requests into new version: #83 and #84

@FZambia
Copy link
Member

FZambia commented Mar 27, 2016

Finally released!

@FZambia FZambia closed this as completed Mar 27, 2016
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