-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Document how to import a Docker secret as a configtree #25095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you expand on why you need to set the environment variable as |
I have to check that. As I know the path of secrets for docker secrets is always |
I figure out, just name the file Reading the docs, I would expect, define properties with dots via configtree this is only possible trough sub directions. |
I wonder if we should update the documentation here? I'm not sure that, strictly speaking, what Docker writes out is a configtree so it may get a bit confusing. |
In ur application.properties file you need to add the property keycloak.password should be the file name you are creating and the file should contain the secret password |
@sreenathhari Thanks! Everything works already fine and document here: https://github.com/adorsys/keycloak-config-cli#configure-properties-values-through-files From spring docs, its not known that /var/run/secrets.keycloak worked. By reading the docs I thought the file must be named /var/run/secrets/keycloak. |
Hi,
Context:
I'm trying to configure a spring boot application using docker secrets. Since spring boot does not support _FILE environment vars out of box. I figure out whats should work out of the box.
Reading spring-projects/spring-framework#21961 I got this: #19990
The configuration is needs a property called
keycloak.password
. I setup a docker secret calledkeycloak-password
which lives in/var/run/secrets/keycloak-password
. As i know, docker secrets are always in/var/run/secrets/
, I could not use the wildcard feature of config tree here.According to https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/html/spring-boot-features.html#boot-features-external-config-files-configtree I configured may application env variables like this:
but the still missing the
keycloak.password
property.While
KEYCLOAK_PASSWORD=admin
work fine, usingKEYCLOAK_PASSWORD=${keycloak-password}
raise an error like:Actual Result
The property
keycloak.password
isn't configureable via docker secrets. Re-assign the var via environment variables results in Circular placeholder reference.Expected Result
Configtree should have the same relax binding support as I known form env variables.
The text was updated successfully, but these errors were encountered: