When configuring username and password for postgres db, it would be great to not have to hardcode the values into the config file.
When using containerisation runtimes like docker-compose or kubernetes, it is common to have and required secrets made available as environment variables supplied into the container at runtime.
In short, instead of this:
<dimension type="postgresql" name="time" default="d1" time="true">
<connection>
host=my.postgres.host.org user=mapcache password=xxchangemexx dbname=index port=5433
</connection>
<list_query>SELECT ts FROM timedim</list_query>
<validate_query>
SELECT to_char(ts,'YYYY-MM-DD"T"HH24:MI:SS"Z"') FROM timedim
WHERE ts >= to_timestamp(:start_timestamp)
AND ts <= to_timestamp(:end_timestamp)
ORDER BY ts DESC
</validate_query>
</dimension>
I want to do this:
<dimension type="postgresql" name="time" default="d1" time="true">
<connection>
host=my.postgres.host.org user=${DB_USERNAME} password=${DB_PASSWORD} dbname=index port=5433
</connection>
<list_query>SELECT ts FROM timedim</list_query>
<validate_query>
SELECT to_char(ts,'YYYY-MM-DD"T"HH24:MI:SS"Z"') FROM timedim
WHERE ts >= to_timestamp(:start_timestamp)
AND ts <= to_timestamp(:end_timestamp)
ORDER BY ts DESC
</validate_query>
</dimension>
Similar question on stackoverflow:
https://gis.stackexchange.com/questions/418360/referencing-environment-variables-in-mapcache-xml
Kind of related to #273
When configuring username and password for postgres db, it would be great to not have to hardcode the values into the config file.
When using containerisation runtimes like docker-compose or kubernetes, it is common to have and required secrets made available as environment variables supplied into the container at runtime.
In short, instead of this:
I want to do this:
Similar question on stackoverflow:
https://gis.stackexchange.com/questions/418360/referencing-environment-variables-in-mapcache-xml
Kind of related to #273