🐳 feat: Bundle Admin Panel in Docker Compose Stacks#13876
Merged
Conversation
73cd785 to
e04b1c1
Compare
Merged
5 tasks
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.
Summary
I bundled the LibreChat Admin Panel into both Docker Compose stacks so a default deployment ships with the admin panel running alongside LibreChat, with no extra setup. The panel is an API client (it reaches LibreChat over the REST API, not the database directly), so it only needs to talk to the
apiservice.admin-panelservice todocker-compose.yml, published on a host port (http://localhost:3000by default, overridable viaADMIN_PANEL_PORT). It pointsAPI_SERVER_URLathttp://api:${PORT}for server-side calls andVITE_API_BASE_URLatDOMAIN_CLIENTfor browser-facing OAuth redirects.admin-panelservice todeploy-compose.ymlwith no published port, fronted by the existing nginx reverse proxy and served at thehttp://admin.localhostsubdomain.ADMIN_PANEL_URL=http://admin.localhoston the deploy-composeapiservice so LibreChat builds admin OAuth/SSO callbacks against the subdomain, and addedadmin-panelto the nginxclientservice'sdepends_on.admin.localhostserver block toclient/nginx.confthat proxies toadmin-panel:3000. It resolves the upstream through Docker's embedded DNS (127.0.0.11) with a variable, so nginx still starts when theadmin-panelservice is absent (this config is also shared byutils/docker/test-compose.yml). Added a$connection_upgrademap for WebSocket/SSE passthrough and a commented SSL variant mirroring the existing one.ADMIN_PANEL_SESSION_SECRETto.env.examplewith a development default (the panel requires a 32+ char secret and the image has no built-in default, so "always on" must work out of the box), matching the existing convention forCREDS_KEY/JWT_SECRET/MEILI_MASTER_KEY. DocumentedADMIN_PANEL_PORT.Access
docker-compose.yml):http://localhost:3000deploy-compose.yml):http://admin.localhost(browsers resolve*.localhostto127.0.0.1automatically; non-browser tools may need a hosts entry)Notes
admin-panelservice or gate it behind a composeprofiles:entry.SESSION_COOKIE_SECUREdefaults tofalsefor plain-HTTP local use; set it totrue(viaADMIN_PANEL_SESSION_COOKIE_SECURE) when serving the panel over HTTPS.ADMIN_PANEL_SESSION_SECRET, pointDOMAIN_CLIENTandADMIN_PANEL_URLat real domains, and terminate TLS.Change Type
Testing
I validated the configuration statically without booting the full stack:
docker compose -f docker-compose.yml configanddocker compose -f deploy-compose.yml configboth render cleanly; theadmin-panelservice resolves its env, the deployapiservice receivesADMIN_PANEL_URL=http://admin.localhost, and the nginxclientservice depends onadmin-panel.nginx -tpasses against the updatedclient/nginx.conf.ghcr.io/clickhouse/librechat-admin-panel:latestimage manifest exists and is multi-arch (amd64 + arm64).Recommended follow-up smoke test:
cp .env.example .env, thendocker compose upand confirm the panel loads athttp://localhost:3000; anddocker compose -f deploy-compose.yml up, then confirmhttp://admin.localhostloads and email/password login against LibreChat succeeds.Test Configuration:
Checklist