well that's an embuggerance. It seems that env var...
# talk-oathkeeper
c
well that's an embuggerance. It seems that env vars are not expanded inside an access-rules.yml file
is this not possible ?
I worked out a way with https://github.com/a8m/envsubst and using
inotifyd
to watch for changes in the template folder, then run envsubst to populate the actual config files from the templates works a treat. So when using as a docker volume, map the
templates
folder to the container so when you make any change to a template,
inotifyd
kicks in and regenerates the config files. Oathkeeper is watching for changes in the config yml and therefore reloads I get bonus points for automating all of this in a docker container, and for also mapping the .env files, so I can experiment with all configs and envs without having to restart or rebuild the container 🙂
m
Great solution, thanks for sharing! 🙌 If you feel this could be useful to others and you ever want to contribute a minimal example for this in github.com/ory/examples, let me know (or just start a PR). I will also try it out when I get around to it.