-
1. Re: Set variable for redirect-socket attribute to the http-listener element in standalone.xml
jewellgm Oct 9, 2018 1:52 PM (in response to aa.oboulot)1 of 1 people found this helpfulThe CLI may not be parsing the variable correctly. I suggest providing a default value option. ie "${env.REDIRECT_SOCKET:https}". You may even be able to get away with nothing after the ":" character.
If neither of those work, the CLI may not support environment variable expansion. In that case, a workaround would be to dump the environment variables to a properties file, and then to pass the properties file as a parameter to the startup script.
In windows:
set > environment.properties
jboss-cli.bat --properties=environment.properties
In Linux:
printenv > environment.properties
jboss-cli-sh --properties=environment.properties
Edit: I just discovered in the file "jboss-cli.xml" a configuration setting for resolving parameter values. By default, it's set to "false" Try setting this value to "true" to see if that resolves the situation for you. Bad pun....
-
2. Re: Set variable for redirect-socket attribute to the http-listener element in standalone.xml
ctomc Oct 10, 2018 5:15 AM (in response to jewellgm)1 of 1 people found this helpfulsocket-binding, redirect-socket as well as few other properties on listeners are model references, as in they link to different part of configuration.
as such they do not allow expressions to be used on them.
you can see details about model description at WildFly 14.0 Model Reference
or by running :read-resource-description cli command on selected resource.
-
3. Re: Set variable for redirect-socket attribute to the http-listener element in standalone.xml
aa.oboulot Oct 10, 2018 11:24 AM (in response to ctomc)Thanks,
I'm trying to launch Wildfly with a docker-compose (for Keycloak), and I try to parameter the redirect-socket because I want to change this properties if I have a HTTP proxy or a HTTPS proxy, with the same Docker image.
I hoped that I could do that through CLI... how can I do that if this properties do not allow expression.Best regards,
Adrian.
-
4. Re: Set variable for redirect-socket attribute to the http-listener element in standalone.xml
jewellgm Oct 10, 2018 4:11 PM (in response to aa.oboulot)Do you actually want the variable to appear in the configuration? Or do you just want the resolved value? I am guessing that you only run the CLI once per image, because the environment for the specific instance of that image won't change. If that's the case, then setting that property in the jboss-cli.xml file may be sufficient. It expands the variable before it's written to the configuration file.
-
5. Re: Set variable for redirect-socket attribute to the http-listener element in standalone.xml
aa.oboulot Oct 10, 2018 4:29 PM (in response to jewellgm)I want the variable to appear in the configuration and resolve when I launch the container with docker-compose.
Best regards,
Adrian.