Skip to content

Add Linux container, make model base URL separately configurable, auto-configure UI - #1

Open
mgoltzsche wants to merge 7 commits into
srware-net:mainfrom
mgoltzsche:build-container
Open

Add Linux container, make model base URL separately configurable, auto-configure UI#1
mgoltzsche wants to merge 7 commits into
srware-net:mainfrom
mgoltzsche:build-container

Conversation

@mgoltzsche

@mgoltzsche mgoltzsche commented Apr 7, 2026

Copy link
Copy Markdown

Thanks for sharing this project! Great for small prototypes, experiments as well as demos/examples.

To make the project easier to consume/use, this PR makes it publish a docker container image and let's the UI auto-configure the API base URL. Here are the improvements listed in more detail:

  • Build a Linux container image based on nginx that reverse-proxies the OpenAI API endpoints, allowing to configure the base URL of the models and chat completion endpoints separately via env vars, avoiding the CORS problem and manual API base URL configuration and model loading within the UI.
  • Derive API base URL from the server URL when the web UI is hosted on an HTTP server, assuming the API endpoints are reverse-proxied.
  • Auto-load the models when the web UI is hosted on an HTTP server (since the base URL is automatically derived already now).
  • Add a GitHub Actions workflow that publishes a git tag, multi-arch container image (for amd64 & arm64) and GitHub release with a changelog every time a release-worthy (set of) git commits (indicated by the commit message, requiring the conventional commits format (feat: ..., fix: ..., ...)) is pushed to the main branch. On pull request builds it performs a dry-run release, not publishing anything but already validating the commit messages.

My fork is already publishing the container image using the changes contained within this PR (e.g. run docker run --rm -p 8000:8000 ghcr.io/mgoltzsche/statelesschatui:0.1.2) but I'd be happy to archive my repo and use your published image version as soon as you merge this PR.

@mgoltzsche
mgoltzsche force-pushed the build-container branch 3 times, most recently from 7c15570 to c3d3029 Compare April 15, 2026 18:05
Builds an nginx-based container that reverse-proxies the OpenAI endpoints, allowing to override each base URL separately via environment variables and avoiding CORS problems.

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
This avoids the need for the user to configure the API base URL manually within the web UI and reduces the click path.
It is now possible since the web UI is served by nginx along with the reverse-proxied API endpoints.

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
Publishes a gh container image whenever a release-worthy commit is pushed (based on conventional commits).
Correspondingly it requires all commit messages from now on to be formatted according to the conventional commits specification, see https://www.conventionalcommits.org/en/v1.0.0/
@mgoltzsche
mgoltzsche force-pushed the build-container branch 4 times, most recently from 80d8639 to c3b5419 Compare April 15, 2026 18:51
@mgoltzsche

Copy link
Copy Markdown
Author

@srware-net this PR is polished and ready for review now!
It even provides a GitHub workflow that you can merge as is to get StatelessChatUI published as a multi-arch Linux container in GitHub's container registry.

@mgoltzsche
mgoltzsche force-pushed the build-container branch 5 times, most recently from cc2efdb to 5990705 Compare April 15, 2026 20:48
@mgoltzsche

Copy link
Copy Markdown
Author

I forgot to mention: before you merge the PR it would be good to manually push a v1.1.0 tag pointing to the latest commit on the main branch as a base line for the automatic release mechanism provided by the conventional-release action since it relies on git tags following semantic versioning. Once you pushed the tag, the GitHub workflow would create a new tag v1.2.0 as soon as you'd merge the PR. If you wouldn't push the v1.1.0 tag initially, the workflow would start releasing with v0.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant