I've a problem regarding Wildfly/Undertow and the JBoss-CLI setting the web-context of Keycloak.
The environment-variable seems not to be resolved in undertow itself, but other environment-variable seems to be resolved.
I've create the following CLI-script:
/subsystem=keycloak-server/:write-attribute(name=web-context,value=${env.KEYCLOAK_WEB_CONTEXT:auth})
which is executed by the docker build and the result in the standalone.xml also looks good :)
When starting the Keycloak-Service it does not resolve the variable, it will just use the variable itself:
14:30:30,556 INFO [org.wildfly.extension.undertow] (ServerService
Thread Pool -- 60) WFLYUT0021: Registered web context:
'/${env.KEYCLOAK_WEB_CONTEXT:auth}' for server 'default-server'
After connecting with the jboss-cli.sh to the container and requesting the variables I got:
[standalone@localhost:9990 subsystem=keycloak-server] ls -l
ATTRIBUTE VALUE TYPE
web-context ${env.KEYCLOAK_WEB_CONTEXT:auth} STRING
With resolved expressions:
[standalone@localhost:9990 subsystem=keycloak-server] ls -l --resolve-expressions
ATTRIBUTE VALUE TYPE
web-context helloworld/auth STRING
So everything looks good so far. Any ideas why Undertow starts with the variable and not the resolved variable? Is it a potential bug?
Best regards and thank you for any help!