Document LYO_BASEURL for custom base URL configuration#491
Conversation
|
|
…compose files Co-authored-by: berezovskyi <64734+berezovskyi@users.noreply.github.com>
…uidance Co-authored-by: berezovskyi <64734+berezovskyi@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Documents and surfaces the existing LYO_BASEURL configuration so users can control the public/advertised URLs (host/port/prefix) that the RefImpl servers emit in rootservices and generated links—especially useful behind reverse proxies.
Changes:
- Added README documentation explaining
LYO_BASEURL, including usage examples and guidance about not including/services/. - Added commented-out
LYO_BASEURLexamples tosrc/docker-compose.yml. - Added commented-out
LYO_BASEURLexamples tosrc/docker-compose.tomcat.yml.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/docker-compose.yml | Adds commented examples showing how to set LYO_BASEURL per service. |
| src/docker-compose.tomcat.yml | Adds the same commented LYO_BASEURL examples for the Tomcat compose setup. |
| README.md | Introduces a “Configuring Base URLs” section documenting LYO_BASEURL and how it affects advertised URLs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| By default, the servers use `http://localhost:8080` as the base URL. You can override this using the `LYO_BASEURL` environment variable to configure the public-facing URL for each server. This is particularly useful when: | ||
| - Running behind a reverse proxy | ||
| - Deploying to a cloud environment with a custom domain | ||
| - Using non-standard ports or HTTPS |
There was a problem hiding this comment.
The new section says the servers use http://localhost:8080 as the base URL by default, but immediately above you document the servers as being available on http://localhost:8800..8803. Since LYO_BASEURL affects the advertised/public URIs in rootservices and generated links (not reachability), consider rewording this to explicitly call out the difference (container internal port 8080 vs published host ports 880x) and optionally mention that setting LYO_BASEURL to http://localhost:8800 etc. aligns the advertised URLs when using Docker Compose.
| For a reverse proxy deployment where the RM server is accessible at `https://mytoolchain.example.com:9443/refimpl/rm/`: | ||
| ```bash | ||
| export LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/rm | ||
| ``` |
There was a problem hiding this comment.
The reverse-proxy example shows the RM server accessible at https://mytoolchain.example.com:9443/refimpl/rm/ (trailing slash), but the LYO_BASEURL value in both examples omits the trailing slash. Please make these consistent and, if there’s a preferred format (with/without trailing slash), state it explicitly to avoid users accidentally ending up with double slashes or missing separators in generated URLs.
| - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/rm | ||
| ``` | ||
|
|
||
| See the commented examples in `docker-compose.yml` for more details. |
There was a problem hiding this comment.
This points readers only to docker-compose.yml, but the repo also provides docker-compose.tomcat.yml with the same LYO_BASEURL examples. Consider referencing both files here so users on the Tomcat compose path don’t miss the configuration guidance.
| See the commented examples in `docker-compose.yml` for more details. | |
| See the commented examples in `docker-compose.yml` and `docker-compose.tomcat.yml` for more details. |
Users had no way to discover the existing
LYO_BASEURLenvironment variable for configuring custom hosts, ports, and paths when deploying behind reverse proxies or to cloud environments.Changes
Usage
Set per-service URLs for reverse proxy deployments:
Or via shell:
export LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/rmThe servlet path (
/services/) is automatically appended by the application.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.