Repository navigation
build: run the admin UI from a container, like everything else - #14
Merged
Merged
Conversation
Every other part of OpenTaberna comes up with `docker compose up -d`. The admin UI was the exception, running only from source, so bringing the whole system up meant remembering that one piece worked differently. Adds Dockerfile, nginx.conf, compose.yaml and .dockerignore mirroring OpenTaberna/frontend: a multi-stage build serving the built app from nginx on port 4200. The API is now addressed as /api rather than a hardcoded http://localhost:8000. nginx maps it in the container and proxy.conf.json maps it for ng serve, so both ways of running the app behave identically and neither carries an API host in the bundle. The Keycloak URL stays absolute, because the browser is redirected there and a same-origin path would be meaningless. Closes #13 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YY1ekLLeFLkAU2kvdQ8Ey4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #13
The admin UI was the only part of OpenTaberna you could not
docker compose up. Now itmatches
OpenTaberna/frontendexactly:Dockerfile,nginx.conf,compose.yaml,.dockerignore, multi-stage build, nginx on 4200.The API is now
/api, not a hardcoded hostapiBaseUrlwashttp://localhost:8000, baked into the bundle. It is now the same-originpath
/api, mapped two ways:/api/→http://host.docker.internal:8000/, same as the storefrontng serve—proxy.conf.jsondoes the same, sonpm startkeeps workingBoth behave identically and neither ships an API host. The Keycloak URL stays absolute,
because the browser is redirected there and a same-origin path would be meaningless.
Verification
And
ng servestill reaches the API through the new dev proxy:One thing I found and did not fix here
src/environments/environment.prod.tsis never referenced.angular.jsonhas nofileReplacements, song build --configuration productionsilently usesenvironment.ts— which is why the hardcoded
http://localhost:8000mattered at all.This change removes the immediate harm (there is no host to get wrong now), but the dead
file is still misleading: it carries a real-looking
https://auth.opentaberna.deKeycloakURL that no build has ever used. Worth either wiring up or deleting, in its own change.