From 776e28eeb00d11cbd29896a2c51a38eb438feb07 Mon Sep 17 00:00:00 2001 From: Julian Merkle Date: Wed, 22 Jan 2025 18:23:04 +0100 Subject: [PATCH] fix: Backend startup with BASE_HREF set Backend does not need BASE_HREF patching and crashes if a BASE_HREF is set in the entrypoint.sh. Fixes #632 --- backend/entrypoint.sh | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh index 12a29ae7..d7193449 100755 --- a/backend/entrypoint.sh +++ b/backend/entrypoint.sh @@ -8,24 +8,9 @@ if [ ! -f "/proc/net/if_inet6" ]; then sed -i 's/\[::\]//g' /usr/src/kitchenowl/wsgi.ini fi -# patch the web base href if requested -if [ ! -z $BASE_HREF ]; then - if [[ $BASE_HREF == *"#"* ]]; then - echo "$ME: error: BASE_HREF must not contain character '#'" >&2 - exit 1 - elif [[ $BASE_HREF != "/"* ]]; then - echo "$ME: error: BASE_HREF must begin with a forward slash: /example/" >&2 - exit 1 - elif [[ $BASE_HREF != *"/" ]]; then - echo "$ME: error: BASE_HREF must end with a forward slash: /example/" >&2 - exit 1 - fi - sed -i "s###g" /var/www/web/kitchenowl/index.html -fi - mkdir -p $STORAGE_PATH/upload flask db upgrade if [ "${SKIP_UPGRADE_DEFAULT_ITEMS}" != "true" ] && [ "${SKIP_UPGRADE_DEFAULT_ITEMS}" != "True" ]; then python upgrade_default_items.py fi -uwsgi "$@" \ No newline at end of file +uwsgi "$@"