This repository was archived by the owner on Jul 8, 2025. It is now read-only.
chore: get base api url from index.html #369
Merged
+82
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to allow users to override the
BASE_API_URLrather than using localhost, I switch the entry point for reading the env var to index.html, in this way it is much cleaner to override in the codegateentrypoint.sh.This use case was raised up from a user in discord and it is actually handled by
sedwithin the entrypoint.No breaking changes
Replace BASE_API_URL at
docker run...Setting the env at docker run time we are going to replace the
${BASE_API_URL}value in the htmlKapture.2025-03-05.at.10.20.47.mp4
Default use case, no env replacement
In case the
BASE_API_URLis not replaced at docker run time, it will use theVITE_BASE_API_URLdefault valueKapture.2025-03-05.at.10.23.56.mp4
Development mode

Works as expected, using the
VITE_BASE_API_URLenv