Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Conversation

@peppescg
Copy link
Collaborator

@peppescg peppescg commented Mar 5, 2025

In order to allow users to override the BASE_API_URL rather 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 codegate entrypoint.sh.
This use case was raised up from a user in discord and it is actually handled by sed within 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 html

Kapture.2025-03-05.at.10.20.47.mp4

Default use case, no env replacement
In case the BASE_API_URL is not replaced at docker run time, it will use the VITE_BASE_API_URL default value

Kapture.2025-03-05.at.10.23.56.mp4

Development mode
Works as expected, using the VITE_BASE_API_URL env
Screenshot 2025-03-05 at 10 17 31

@peppescg peppescg self-assigned this Mar 5, 2025
@peppescg peppescg linked an issue Mar 5, 2025 that may be closed by this pull request
@coveralls
Copy link
Collaborator

coveralls commented Mar 5, 2025

Pull Request Test Coverage Report for Build 13675027451

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 69.903%

Totals Coverage Status
Change from base Build 13674701058: 0.1%
Covered Lines: 881
Relevant Lines: 1195

💛 - Coveralls

@peppescg peppescg merged commit 787519d into main Mar 5, 2025
7 checks passed
@peppescg peppescg deleted the issues/364 branch March 5, 2025 11:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore]: read BASE API URL from index.html

4 participants