refactor: ♻️ improve config setting script for readability
Refactor the configuration script to use an associative array for better readability and maintainability. This change streamlines how configuration values are set in the initialization script.
This commit is contained in:
parent
71d215d613
commit
d28306db66
|
@ -1,3 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
ckan config-tool ${APP_DIR}/production.ini "ckanext.spatial.common_map.type=Stadia.StamenTerrain" "ckanext.spatial.common_map.max_zoom=18" "ckanext.spatial.search_backend = solr-spatial-field" "ckan.search.solr_allowed_query_parsers = field" "ckan.harvest.mq.type=redis" "ckan.harvest.mq.hostname=redis" "googleanalytics.id=UA-1010101-1"
|
||||
declare -A config_values=(
|
||||
["ckanext.spatial.common_map.type"]="Stadia.StamenTerrain"
|
||||
["ckanext.spatial.common_map.max_zoom"]="18"
|
||||
["ckanext.spatial.search_backend"]="solr-spatial-field"
|
||||
["ckan.search.solr_allowed_query_parsers"]="field"
|
||||
["ckan.harvest.mq.type"]="redis"
|
||||
["ckan.harvest.mq.hostname"]="redis"
|
||||
["googleanalytics.id"]="UA-1010101-1"
|
||||
)
|
||||
|
||||
for key in "${!config_values[@]}"; do
|
||||
ckan config-tool "${CKAN_INI}" "${key}=${config_values[$key]}"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue