diff --git a/web/Dockerfile b/web/Dockerfile index d32659aed9..4b04aa6990 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -53,12 +53,14 @@ ENV REEARTH_WEB_DEVELOPER_MODE=null ENV REEARTH_WEB_DOCUMENTATION_URL=null ENV REEARTH_WEB_EARLY_ACCESS_ADMINS=[] ENV REEARTH_WEB_EXTENSION_URLS=[] +ENV REEARTH_WEB_FAVICON_URL= ENV REEARTH_WEB_IP=null ENV REEARTH_WEB_MARKETPLACE_URL=null ENV REEARTH_WEB_PASSWORD_POLICY=null ENV REEARTH_WEB_PLUGINS=null ENV REEARTH_WEB_POLICY=null ENV REEARTH_WEB_PUBLISHED=null +ENV REEARTH_WEB_TITLE= COPY --from=builder --chown=nginx:nginx /app/dist /usr/share/nginx/html COPY --chown=nginx:nginx docker/nginx.conf.template /etc/nginx/templates/nginx.conf.template diff --git a/web/docker/40-envsubst-on-reearth-config.sh b/web/docker/40-envsubst-on-reearth-config.sh index df7850603a..beb5f64c1b 100755 --- a/web/docker/40-envsubst-on-reearth-config.sh +++ b/web/docker/40-envsubst-on-reearth-config.sh @@ -2,8 +2,21 @@ set -e -# rewrite index.html to change title and favicon +# rewrite index.html and published.html to change title and favicon _REEARTH_HTML_FILE="/usr/share/nginx/html/index.html" +_REEARTH_PUBLISHED_HTML_FILE="/usr/share/nginx/html/published.html" + +# Rewrite title tag in index.html only if REEARTH_WEB_TITLE is set +if [ -n "$REEARTH_WEB_TITLE" ]; then + sed -i -e "s|