fix: Re-gzip html files after env variables substitution (#23546)

We replace env variables in `index.html`, `view.html` and `edit.html`,
just before start NGINX. But the `.gz` versions of these files don't
have these changes applied to them. This PR gzips those HTML files
again, after the substitutions are applied.

From
https://github.com/appsmithorg/appsmith/pull/23539#issuecomment-1554509537.
This commit is contained in:
Shrikant Sharat Kandula 2023-05-31 15:27:12 +05:30 committed by GitHub
parent ba0cedc052
commit a08b525007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,6 +84,9 @@ apply-env-vars() {
)
fs.writeFileSync("'"$served"'", content)
'
pushd "$(dirname "$served")"
gzip --keep --force "$(basename "$served")"
popd
}
apply-env-vars /opt/appsmith/index.html.original /opt/appsmith/editor/index.html