-
1. Re: Docker variables in JBoss
anijhawa Jan 30, 2018 7:48 AM (in response to isa154)Is it possible to use some sort of variable for config within standalone.xml.
Yes.it is allow us to use the environment variable in wildfky as following ${env.DB_CONNECTION_URL} :
- <subsystemxmlns="urn:jboss:domain:datasources:4.0">
- <datasources>
- <datasourcejndi-name="java:jboss/datasources/ExampleDS"pool-name="ExampleDS"enabled="true"use-java-context="true">
- <connection-url>${env.DB_CONNECTION_URL}</connection-url>
- <driver>mysql</driver>
- <security>
- <user-name>${env.DB_USERNAME}</user-name>
- <password>${env.DB_PASSWORD}</password>
- </security>
You can see the following link which explains how we can use it in OpenShift : JBoss EAP Environment Variables | OpenShift Developers You can do it on your local system as well.
-
2. Re: Docker variables in JBoss
isa154 Jan 30, 2018 7:55 AM (in response to anijhawa)I have come across this option and have tried it. However what I did not like about this option was the standalone.xml has the ${env.DB_CONN} and I hoped it actually replaced the variable with the value on startup.
-
3. Re: Docker variables in JBoss
anijhawa Jan 31, 2018 7:31 AM (in response to isa154)Do you want to pass through environment variables to the container? Is it your requirement?
-
4. Re: Docker variables in JBoss
isa154 Feb 1, 2018 12:57 AM (in response to anijhawa)When I start the container I do not want to see variables in the standalone.xml , I want the values.
What's the best practice when it comes to JBoss Docker images in different environments, Dev/QA/PROD?
-
5. Re: Docker variables in JBoss
pejonsson Aug 23, 2018 7:18 AM (in response to isa154)I disagree with your request of "seeing the value" instead of the variable?
How can you then know if there is a hardcoding in that specific image of the datasource setting or if it is based on variables?
Can you run the ENV command inside the running container and see your variables maybe?