Does SpiceDB support Environment Variables for configuration? #1495
-
Hi, Given that you are already using viper it should be easy to add the support with something like AutomaticEnv(). Semi related to: #182 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can already do this! We use a project called cobrautil from one of our founders which binds to the environment in a Then SpiceDB picks this up here: Line 8 in 2ea1f2e You can set the value of any flag by specifying it in the form of:
For example 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 be happy for the contribution! |
Beta Was this translation helpful? Give feedback.
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:
spicedb/cmd/spicedb/main.go
Line 8 in 2ea1f2e
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
becomesSPICEDB_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…