Skip to content

Commit

Permalink
replace all existing env VAR
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip authored Feb 27, 2024
1 parent 6940a3f commit 620c2b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ REF=$(date +'%m%d%Y%p')
rm -f /etc/nginx/conf.d/openIMIS.confs
rm -f /etc/nginx/conf.d/default.conf
cp /conf/openimis.conf /etc/nginx/conf.d/openIMIS.conf
envsubst '${PUBLIC_URL},${REACT_APP_API_URL},${NEW_OPENIMIS_HOST},${ROOT_MOBILEAPI},${REDIRECT_TAIL},${DATA_UPLOAD_MAX_MEMORY_SIZE},${$OPENSEARCH_BASIC_TOKEN}' < /conf/openimis.conf > /etc/nginx/conf.d/openIMIS.conf
VARS_TO_REPLACE="$(printenv | grep -Eo "^([A-Z_]*)" | xargs -I % echo \$\{%\}, | xargs)"
envsubst "\${REDIRECT_TAIL}, ${VARS_TO_REPLACE::-1}" < /conf/openimis.conf > /etc/nginx/conf.d/openIMIS.conf
ln -s -f /usr/share/nginx/html /usr/share/nginx/html/${PUBLIC_URL}
echo "Hosting on https://""$NEW_OPENIMIS_HOST"
echo "root uri $PUBLIC_URL"
Expand Down

0 comments on commit 620c2b5

Please sign in to comment.