We currently load ips from src/main/resources/application.properties as a Map<String, List>
server: config: ips: - 10.10.10.10 - 10.10.10.11 - 10.10.10.12 - 10.10.10.13
If I have to pass this from the ENV for a docker container, how should I do it
We currently load ips from src/main/resources/application.properties as a Map<String, List>
server: config: ips: - 10.10.10.10 - 10.10.10.11 - 10.10.10.12 - 10.10.10.13
If I have to pass this from the ENV for a docker container, how should I do it
2
Answers
Is equivalent to
It seems you are using spring… so perhaps you could do
Then set an environment variable
In this instance I don’t think you need the quotes (each value contains at least one non-numeric character, values don’t contain commas) so you can likely do
I’d use a colon (or separator char of your preference) separated value list to send it in a single env variable and then just split it by separator on the receiver end.