I am trying to set up a spring-cloud-config-server for production. I want to read multiple git repos so I am providing following configuration in application.yml of config-server placed in src/main/resources
spring:
application:
name: config-server
profiles:
active: git
cloud:
config:
server:
git:
uri: https://somedomain.com/project1/project1.git
username: project1user
password: project1password
repos:
project2:
pattern: project2/*
uri: https://somedomain.com/project2/project2.git
username: project2user
password: project2password
searchPaths:
- 'src/main/resources'
Now, I want to externalize this configuration of the config server.
I could provide main git repo (https://somedomain.com/project1/project1.git) properties by environment variables like following
spring.cloud.config.server.git.uri=https://somedomain.com/project1/project1.git
spring.cloud.config.server.git.username=project1user
spring.cloud.config.server.git.password=project1password
But what about other git repo properties. Passing complex map-like structure would be pretty tedious if passed via environment variables.
What is the best possible way to pass this configuration of other repos? Passing some configuration as an environment variable has other disadvantages like those properties could not be refreshed on runtime.
Is there any possibility that additional repo configuration is picked by from some configuration file in main git (https://somedomain.com/project1/project1.git) itself?