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

chore: handle DASHBOARD_API_BASE_URL env at docker run time - #1231

Merged
peppescg merged 1 commit into
mainfrom
issues/1229
Mar 6, 2025
Merged

chore: handle DASHBOARD_API_BASE_URL env at docker run time#1231
peppescg merged 1 commit into
mainfrom
issues/1229

Conversation

@peppescg

Copy link
Copy Markdown
Contributor

In order to allow the users to specify the dashboard base api url (by default it is http://localhost:8989) we can add a docker env DASHBOARD_API_BASE_URL that the users can use to set dashboard api base url in the UI.
Rather than using sed for replace the env var in the js file, we can use envsubst through the index.html that includes the env var used in the UI for handle the API requests.

If custom env var, DASHBOARD_API_BASE_URL, miss the default base path,http://localhost:8989, will be used.

The UI is already updated and able to handle the env var.
All the changes are backward compatible.

Discord thread

Custom dashboard api base url
Set the env DASHBOARD_API_BASE_URL="https://api.example.com", all the request will have https://api.example.com as base path.

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

@peppescgpeppescg self-assigned this Mar 5, 2025
@peppescgpeppescg linked an issue Mar 5, 2025 that may be closed by this pull request
@peppescgpeppescg added the docker Pull requests that update Docker code label Mar 5, 2025
@peppescg
peppescg merged commit 96aa48d into mainMar 6, 2025
@peppescg
peppescg deleted the issues/1229 branch March 6, 2025 14:07
danbarr added a commit to stacklok/codegate-docs that referenced this pull request Mar 10, 2025
danbarr added a commit to stacklok/codegate-docs that referenced this pull request Mar 10, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dockerPull requests that update Docker code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore]: define dashboard api base url using docker env

2 participants

@peppescg@aponcedeleonch