Skip to content

Commit c23d367

Browse files
authored
allow load not only yaml files
add a parameter to specify the format of the config files, but default still will be "yml"
1 parent 7b1dad3 commit c23d367

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

load-config.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ cat jhi-acl.json | sed s/to-change-in-production-client/$CLIENT_ACL_TOKEN/ | cur
1717
echo "----------------------------------------------------------------------
1818
Starting Consul Config Loader in $CONFIG_MODE mode"
1919

20-
function loadPropertiesFilesIntoConsul {
21-
for file in $CONFIG_DIR/*.yml
20+
function loadPropertiesFilesIntoConsul {
21+
for file in $CONFIG_DIR/*."${CONFIG_FORMAT:-yml}"
2222
do
2323
filename=$(basename $file)
2424
app=${filename%%.*}
@@ -30,7 +30,7 @@ function loadPropertiesFilesIntoConsul {
3030

3131
if [[ "$CONFIG_MODE" == "filesystem" ]]; then
3232
echo "----------------------------------------------------------------------
33-
Loading YAML config files in Consul K/V Store from the filesystem
33+
Loading config files in Consul K/V Store from the filesystem
3434
Add or edit properties files in '$CONFIG_DIR' to have them
3535
automatically reloaded into Consul
3636
Consul UI: http://$CONSUL_URL:$CONSUL_PORT/ui/#/dc1/kv/config/

0 commit comments

Comments
 (0)