I am trying to set the kratos config "selfservice_...
# ory-selfhosting
s
I am trying to set the kratos config "selfservice_return_urls" from an environment variable as an array. I have tried the selfservice_return_0_urls=http://... selfservice_return_1_urls=http://... form I also tried setting a json array: selfservice_return=[{"urls": "http://...}", {"urls": "http://..."}] but neither style works - is this known to work? can someone post an example that works?
b
Hello, have you tried
selfservice_return_urls_0
?
s
I have not, I will, though the documentation points me at ..._0_urls
worked a treat. OK, what is the best way to report a website/documentation bug to the kratos team?
b
Hmm, the documentation is correct imo, though it may be misinterpreted. You tried to specify a key named "urls" in the array "self_service_return" array for its first element with "selfservice_return_0_urls" whereas
selfservice_return_urls_0
specify the first element of the array
selfservice_return_urls
s
ok, thats fair, perhaps it would be better if there was an example of setting a map and an array from the environment.
c
I am using a simple comma separated list in a docker-compose file and it works. i.e.:
Copy code
environment:
  SELFSERVICE_DEFAULT_BROWSER_RETURN_URL: http://${DEPLOYMENT_HOST}:${DEPLOYMENT_PORT}/user/welcome, http://${DEPLOYMENT_HOST}:${DEPLOYMENT_PORT}/, http://${DEPLOYMENT_HOST}:${DEPLOYMENT_PORT}/dashboard
🙌 1
s
oh? I thought I tried that, that is much simpler and cleaner.
b
yeah indeed, didnt think of this format. thank you !
s
On a similar topic I assume there is still no way to set oathserver rules from environment variables, (https://github.com/ory/oathkeeper/issues/853) or has something changed?
c
That would be useful for me as well, but no. As stated in the issue thread, I am just "printing" them in pre-deployment time with a script.