Closed pirate closed 3 years ago
Allowing environment variables here seems reasonable. We already support them for the main Python API bindings. See the os.environ
stuff in python-zulip-api/zulip/zulip/__init__.py
; we can potentially extract some of that as a function or something to reuse.
@zulipbot claim
Ah, I think I mis-read this issue. It looks like @showell implemented this in #491. I thought this issue was about being able to specify a config file via an environment variable. This is useful so that one can easily run a bot server with multiple bots in an environment like Heroku while also using a production web server like gunicorn.
@zbenjamin My changes were for the standalone config. We probably need to fix botserver the same way.
Hello @zbenjamin, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.
You can reclaim this issue or claim any other issue by commenting @zulipbot claim
on that issue.
Thanks for your contributions, and hope to see you again soon!
@zulipbot claim
Welcome to Zulip, @Aadi-0110! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
@zulipbot claim
Welcome to Zulip, @LoopThrough-i-j! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
Component:
zulip-botserver
Package: https://pypi.org/project/zulip-botserver/ Code: https://github.com/zulip/python-zulip-api/tree/master/zulip_botserverInstead of requiring that config be passed as a file with the
--config-file
option, it would be great if we could pass config via environment variables. This would make our secure key storage system much easier, as right now we use env variables to pass down secure keys to containers, and creating a config file to store them on disk is suboptimal.Becomes:
I would require adding ~20 LOC to https://github.com/zulip/python-zulip-api/blob/master/zulip_botserver/zulip_botserver/server.py, if this proposal sounds reasonable, I can probably submit a PR for it myself without too much difficulty.