PromucFlow_constructor/deploy/docker/fs/opt/appsmith/run-caddy.sh
Shrikant Sharat Kandula 82c24a1190
chore: Render env vars in caddy-reconfigure script (#30673)
Move more logic in managing Caddy into Javascript from the shell script.
2024-01-31 11:38:49 +05:30

22 lines
587 B
Bash
Executable File

#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
if [[ -z "${APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX-}" ]]; then
# For backwards compatibility, if this is not set to anything, we default to no sandbox for iframe widgets.
export APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX="true"
fi
node caddy-reconfigure.mjs
pushd "$(dirname "$WWW_PATH/index.html")"
gzip --keep --force "$(basename "$WWW_PATH/index.html")"
popd
# Caddy may already be running for the loading page.
/opt/caddy/caddy stop --config "$TMP/Caddyfile" || true
exec /opt/caddy/caddy run --config "$TMP/Caddyfile"