diff --git a/README.md b/README.md index 97eea468..1e522bd3 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,34 @@ After that, OSLC servers are available at the following URLs: - http://localhost:8802/services/catalog/singleton - http://localhost:8803/services/catalog/singleton +### Configuring Base URLs + +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 + +**Examples:** + +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 +``` + +When using Docker Compose, set environment variables for each service: +```yaml +services: + server-rm: + environment: + - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/rm +``` + +See the commented examples in `docker-compose.yml` for more details. + +**Note:** The servlet path (e.g., `/services/`) is automatically appended to the base URL, so you should only specify the base path up to but not including `/services/`. + +### OAuth Configuration + Currently, OAuth 1.0 with Basic fallback is enabled only on the OSLC RM server (port 8800). Use `admin:admin` credentials for Basic authentication. In order to enable OAuth support on other servers, uncomment the following lines under `src/main/webapp/WEB-INF/web.xml` of each server: ```xml diff --git a/src/docker-compose.tomcat.yml b/src/docker-compose.tomcat.yml index 74404077..717949c1 100644 --- a/src/docker-compose.tomcat.yml +++ b/src/docker-compose.tomcat.yml @@ -5,21 +5,33 @@ services: dockerfile: ./server-rm/tomcat.Dockerfile ports: - "8800:8080" + # Uncomment to configure the base URL for reverse proxy or custom domain deployments + # environment: + # - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/rm server-cm: build: context: ./ dockerfile: ./server-cm/tomcat.Dockerfile ports: - "8801:8080" + # Uncomment to configure the base URL for reverse proxy or custom domain deployments + # environment: + # - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/cm server-qm: build: context: ./ dockerfile: ./server-qm/tomcat.Dockerfile ports: - "8802:8080" + # Uncomment to configure the base URL for reverse proxy or custom domain deployments + # environment: + # - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/qm server-am: build: context: ./ dockerfile: ./server-am/tomcat.Dockerfile ports: - "8803:8080" + # Uncomment to configure the base URL for reverse proxy or custom domain deployments + # environment: + # - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/am diff --git a/src/docker-compose.yml b/src/docker-compose.yml index 86c9054a..98f08f48 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -5,21 +5,33 @@ services: dockerfile: server-rm/Dockerfile ports: - "127.0.0.1:8800:8080" + # Uncomment to configure the base URL for reverse proxy or custom domain deployments + # environment: + # - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/rm server-cm: build: context: ./ dockerfile: server-cm/Dockerfile ports: - "127.0.0.1:8801:8080" + # Uncomment to configure the base URL for reverse proxy or custom domain deployments + # environment: + # - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/cm server-qm: build: context: ./ dockerfile: server-qm/Dockerfile ports: - "127.0.0.1:8802:8080" + # Uncomment to configure the base URL for reverse proxy or custom domain deployments + # environment: + # - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/qm server-am: build: context: ./ dockerfile: server-am/Dockerfile ports: - "127.0.0.1:8803:8080" + # Uncomment to configure the base URL for reverse proxy or custom domain deployments + # environment: + # - LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/am