Skip to content

Does SpiceDB support Environment Variables for configuration? #1495

Answered by jakedt
alessandromr asked this question in Q&A
Discussion options

You must be logged in to vote

You can already do this! We use a project called cobrautil from one of our founders which binds to the environment in a PreRunE:

https://github.com/jzelinskie/cobrautil/blob/2497cc69df22f338b15647b06111f12e63b8bd8b/cobrautil.go#L51

Then SpiceDB picks this up here:

cobrautil.SyncViperPreRunE("spicedb"),

You can set the value of any flag by specifying it in the form of:

SPICEDB_<KEY_IN_ALL_CAPS_WITH_UNDERSCORES_INSTEAD_OF_DASHES>

For example --log-level becomes SPICEDB_LOG_LEVEL.

Let us know if you have any additional questions. If you want to send a PR to update the documentation in a way which will be clear to you, we would b…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jzelinskie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area/docs Affects docs or metadata (e.g. README) kind/question Clarifying a question without code changes
2 participants
Converted from issue

This discussion was converted from issue #203 on August 17, 2023 16:19.