guess I'm missing something again, but... is there...
# spicedb
d
guess I'm missing something again, but... is there a way to import a schema file directly at startup of the spiceDB docker container? Something like an environment variable SCHEMA_FILE or alike?
https://github.com/thomasdarimont/custom-opa-spicedb/tree/main/demo <- that's one way to go, but looks a bit complicated imo. ideally i'd only add a path to a mounted file here in my compose: https://github.com/DGuhr/keycloak-spicedb-eventlistener/blob/main/docker-compose.yml#L67-L70
v
@dguhr84 there is, yeah:
Copy code
--datastore-bootstrap-files strings                        bootstrap data yaml files to load
      --datastore-bootstrap-overwrite                            overwrite any existing data with bootstrap data
the file format expected is
ValidationFile
YAML from the playground
d
Thanks @vroldanbet - guess it's really time to look at the spicedb CLI help, as its not documented elsewhere. There are a ton of options, nice 🙂
v
that's exactly what I do as well 😅
but I think it would also be fair to have all flags documented in the docs page
d
+1. we created the quarkus keycloak CLI using PicoCLI, there it was very easy to just let the code generate the all-configuration page https://www.keycloak.org/server/all-config from the actual CLI generation code - can recommend for consistency reasons. But I guess you're using another tool, though the help message looks very familiar 😉
in the end I could now remove lots of ugly code, so thanks 🙂 just pushed https://github.com/DGuhr/keycloak-spicedb-eventlistener/commit/9f39e5a9aba17b9475e3cd027cb6b565fac90e59 to main
2 Views