Skip to content

Commit

Permalink
set base href before bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
lakhoune committed Jul 6, 2023
1 parent 4899bb5 commit 1ce6d47
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-localtestclient}
export RASA_NLU=${RASA_NLU:-http://localhost:5005}
export SBF_MANAGER=${SBF_MANAGER:-http://localhost:8080}
export CONTACT_SERVICE_URL=${CONTACT_SERVICE_URL:-http://localhost:8080}
export BASE_HREF=${BASE_HREF:-/}

cp config.json.sample config.json

Expand All @@ -43,7 +42,7 @@ sed -i "s=<SBF_MANAGER_HOST>=$SBF_MANAGER=g" config.json

# find <base href="" /> and replace with the value of BASE_HREF
if [[ -n "$BASE_HREF" ]]; then
sed -i "s=<base href=\"\" />=<base href=\"$BASE_HREF\" />=g" dist/index.html
sed -i "s=<base href=\"\" />=<base href=\"/$BASE_HREF/\" />=g" index.html
fi

npm run build:prod
Expand Down

0 comments on commit 1ce6d47

Please sign in to comment.