From 130c84f0cc5ada4070c7863e2a8d6769e1388a66 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Mon, 10 Aug 2026 15:27:23 +0200 Subject: [PATCH 1/6] server: Add sdk dependency (temporarily) The sdk was not listed as dependency of the server package although it is used in the server extensively. As we have for now no proper cross-package dependency defninition strategy, we apply the same workaround as with the compliance_tool. As the server is never released as package to PyPI but only install in docker image builds, this can be considered as appropiate temporary solution. --- server/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/server/pyproject.toml b/server/pyproject.toml index e87990397..1db41930a 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -38,6 +38,7 @@ requires-python = ">=3.10" dependencies = [ "urllib3>=1.26,<3", "Werkzeug>=3.0.3,<4", + "basyx-python-sdk>=1.0.0" # TODO: declare proper cross-package dependencies (see issue #592) ] [project.optional-dependencies] From 72113e0832e40127887f3c6608c895b1a6f52a43 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Mon, 10 Aug 2026 15:40:35 +0200 Subject: [PATCH 2/6] server: Adapt docker build to run from /server Previously the docker builds needed the repository root as build context in order to copy the content of sdk and server directory. In order to isolate the server package in its `/server` subpath, the build now uses this directory as context. The sdk sources are passed via an additional build context. CI jobs, docker-compose.yml files and Readmes are adapted accordingly. --- .github/actions/build-server/action.yml | 4 +++- server/README.md | 10 +++++----- server/docker/discovery/Dockerfile | 16 ++++++++-------- server/docker/registry/Dockerfile | 16 ++++++++-------- server/docker/repository/Dockerfile | 14 +++++++------- .../discovery_standalone/compose.yml | 6 ++++-- .../registry_standalone/compose.yml | 6 ++++-- .../repository_standalone/compose.yaml | 6 ++++-- 8 files changed, 43 insertions(+), 35 deletions(-) diff --git a/.github/actions/build-server/action.yml b/.github/actions/build-server/action.yml index 0f1070a17..04150d402 100644 --- a/.github/actions/build-server/action.yml +++ b/.github/actions/build-server/action.yml @@ -60,7 +60,9 @@ runs: id: build uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a #v7.3.0 with: - context: . + context: ./server + build-contexts: | + sdk=./sdk file: ./server/docker/${{ inputs.server-profile }}/Dockerfile tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/server/README.md b/server/README.md index 1a3e42173..42e7cbe41 100644 --- a/server/README.md +++ b/server/README.md @@ -20,19 +20,19 @@ See [below](#options) on how to configure this. Pre-built images are published to [Docker Hub][11] on every release. Pull the latest version via: ``` -$ docker pull eclipsebasyx/basyx-python-server:latest +$ docker pull eclipsebasyx/basyx-python-repository:latest ``` Or pin to a specific release by replacing `` with the desired release number: ``` -$ docker pull eclipsebasyx/basyx-python-server: +$ docker pull eclipsebasyx/basyx-python-repository: ``` ## Building -If you need to build the image locally (e.g. for development), run: +If you need to build an image locally (e.g. for development), run in this directory: ``` -$ docker build -t basyx-python-server -f Dockerfile .. +$ docker build -t basyx-python-repository -f docker/repository/Dockerfile --build-context sdk=../sdk . ``` Note that when cloning this repository on Windows, Git may convert the line separators to CRLF. This breaks [`entrypoint.sh`](docker/repository/entrypoint.sh) and [`stop-supervisor.sh`](docker/common/stop-supervisor.sh). Ensure both files use LF line separators (`\n`) before building. @@ -96,7 +96,7 @@ The server can also be run directly on the host system without Docker, NGINX and 1. Install the local SDK and the local server package. ```bash $ pip install ../sdk - $ pip install ./app + $ pip install . ``` 2. Run the server by executing the main function in [`./app/interfaces/repository.py`](./app/interfaces/repository.py). diff --git a/server/docker/discovery/Dockerfile b/server/docker/discovery/Dockerfile index 66c9618e8..49630d4e8 100644 --- a/server/docker/discovery/Dockerfile +++ b/server/docker/discovery/Dockerfile @@ -15,12 +15,12 @@ RUN apk update && \ pip install uwsgi && \ apk del git bash -COPY ./sdk /sdk -COPY ./server/app /server/app -COPY ./server/pyproject.toml /server/pyproject.toml -COPY ./server/docker/discovery/uwsgi.ini /etc/uwsgi/ -COPY ./server/docker/common/supervisord.ini /etc/supervisor/conf.d/supervisord.ini -COPY ./server/docker/common/stop-supervisor.sh /etc/supervisor/stop-supervisor.sh +COPY --from=sdk . /sdk +COPY ./app /server/app +COPY ./pyproject.toml /server/pyproject.toml +COPY ./docker/discovery/uwsgi.ini /etc/uwsgi/ +COPY ./docker/common/supervisord.ini /etc/supervisor/conf.d/supervisord.ini +COPY ./docker/common/stop-supervisor.sh /etc/supervisor/stop-supervisor.sh RUN chmod +x /etc/supervisor/stop-supervisor.sh # Makes it possible to use a different configuration @@ -36,7 +36,7 @@ ENV CLIENT_BODY_BUFFER_SIZE=1M ENV API_BASE_PATH=/api/v3.1/ # Copy the entrypoint that will generate Nginx additional configs -COPY server/docker/common/entrypoint.sh /entrypoint.sh +COPY ./docker/common/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] @@ -47,4 +47,4 @@ WORKDIR /server/app RUN pip install ../../sdk RUN pip install .. -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.ini"] \ No newline at end of file +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.ini"] diff --git a/server/docker/registry/Dockerfile b/server/docker/registry/Dockerfile index df367f2d6..e04970e4a 100644 --- a/server/docker/registry/Dockerfile +++ b/server/docker/registry/Dockerfile @@ -16,12 +16,12 @@ RUN apk update && \ apk del git bash -COPY ./sdk /sdk -COPY ./server/app /server/app -COPY ./server/pyproject.toml /server/pyproject.toml -COPY ./server/docker/registry/uwsgi.ini /etc/uwsgi/ -COPY ./server/docker/common/supervisord.ini /etc/supervisor/conf.d/supervisord.ini -COPY ./server/docker/common/stop-supervisor.sh /etc/supervisor/stop-supervisor.sh +COPY --from=sdk . /sdk +COPY ./app /server/app +COPY ./pyproject.toml /server/pyproject.toml +COPY ./docker/registry/uwsgi.ini /etc/uwsgi/ +COPY ./docker/common/supervisord.ini /etc/supervisor/conf.d/supervisord.ini +COPY ./docker/common/stop-supervisor.sh /etc/supervisor/stop-supervisor.sh RUN chmod +x /etc/supervisor/stop-supervisor.sh # Makes it possible to use a different configuration @@ -44,7 +44,7 @@ ENV STORAGE_OVERWRITE=False VOLUME ["/input", "/storage"] # Copy the entrypoint that will generate Nginx additional configs -COPY server/docker/common/entrypoint.sh /entrypoint.sh +COPY ./docker/common/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] @@ -55,4 +55,4 @@ WORKDIR /server/app RUN pip install ../../sdk RUN pip install .. -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.ini"] \ No newline at end of file +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.ini"] diff --git a/server/docker/repository/Dockerfile b/server/docker/repository/Dockerfile index bc58e3e65..c0136f1b3 100644 --- a/server/docker/repository/Dockerfile +++ b/server/docker/repository/Dockerfile @@ -17,12 +17,12 @@ RUN apk update && \ # Copy only the files we need to run the container # The argumentation for this is to keep the containers as slim as possible. -COPY ./sdk /sdk -COPY ./server/app /server/app -COPY ./server/pyproject.toml /server/pyproject.toml -COPY ./server/docker/repository/uwsgi.ini /etc/uwsgi/ -COPY ./server/docker/common/supervisord.ini /etc/supervisor/conf.d/supervisord.ini -COPY ./server/docker/common/stop-supervisor.sh /etc/supervisor/stop-supervisor.sh +COPY --from=sdk . /sdk +COPY ./app /server/app +COPY ./pyproject.toml /server/pyproject.toml +COPY ./docker/repository/uwsgi.ini /etc/uwsgi/ +COPY ./docker/common/supervisord.ini /etc/supervisor/conf.d/supervisord.ini +COPY ./docker/common/stop-supervisor.sh /etc/supervisor/stop-supervisor.sh RUN chmod +x /etc/supervisor/stop-supervisor.sh # Makes it possible to use a different configuration @@ -45,7 +45,7 @@ ENV STORAGE_OVERWRITE=False VOLUME ["/input", "/storage"] # Copy the entrypoint that will generate Nginx additional configs -COPY server/docker/common/entrypoint.sh /entrypoint.sh +COPY ./docker/common/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/server/example_configurations/discovery_standalone/compose.yml b/server/example_configurations/discovery_standalone/compose.yml index 0aea1510b..788b335cd 100644 --- a/server/example_configurations/discovery_standalone/compose.yml +++ b/server/example_configurations/discovery_standalone/compose.yml @@ -2,8 +2,10 @@ name: basyx-python-server services: app: build: - context: ../../.. - dockerfile: server/docker/discovery/Dockerfile + context: ../.. + additional_contexts: + - sdk=../../../sdk + dockerfile: ./docker/discovery/Dockerfile ports: - "8084:80" environment: diff --git a/server/example_configurations/registry_standalone/compose.yml b/server/example_configurations/registry_standalone/compose.yml index f7ac9223e..c56e34489 100644 --- a/server/example_configurations/registry_standalone/compose.yml +++ b/server/example_configurations/registry_standalone/compose.yml @@ -1,8 +1,10 @@ services: app: build: - context: ../../.. - dockerfile: server/docker/registry/Dockerfile + context: ../.. + additional_contexts: + - sdk=../../../sdk + dockerfile: ./docker/discovery/Dockerfile ports: - "8083:80" volumes: diff --git a/server/example_configurations/repository_standalone/compose.yaml b/server/example_configurations/repository_standalone/compose.yaml index 10e8b17f1..bde35b376 100644 --- a/server/example_configurations/repository_standalone/compose.yaml +++ b/server/example_configurations/repository_standalone/compose.yaml @@ -2,8 +2,10 @@ name: basyx-python-server services: app: build: - context: ../../.. - dockerfile: server/docker/repository/Dockerfile + context: ../.. + additional_contexts: + - sdk=../../../sdk + dockerfile: ./docker/discovery/Dockerfile ports: - "8080:80" volumes: From fa70b3a7ae1db253c7083662a1b9fe6f0221ce60 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Mon, 10 Aug 2026 16:08:58 +0200 Subject: [PATCH 3/6] server: Fix wrong Dockerfile in standalone compose files --- server/example_configurations/registry_standalone/compose.yml | 2 +- .../example_configurations/repository_standalone/compose.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/example_configurations/registry_standalone/compose.yml b/server/example_configurations/registry_standalone/compose.yml index c56e34489..88462401a 100644 --- a/server/example_configurations/registry_standalone/compose.yml +++ b/server/example_configurations/registry_standalone/compose.yml @@ -4,7 +4,7 @@ services: context: ../.. additional_contexts: - sdk=../../../sdk - dockerfile: ./docker/discovery/Dockerfile + dockerfile: ./docker/registry/Dockerfile ports: - "8083:80" volumes: diff --git a/server/example_configurations/repository_standalone/compose.yaml b/server/example_configurations/repository_standalone/compose.yaml index bde35b376..76074a0a3 100644 --- a/server/example_configurations/repository_standalone/compose.yaml +++ b/server/example_configurations/repository_standalone/compose.yaml @@ -5,7 +5,7 @@ services: context: ../.. additional_contexts: - sdk=../../../sdk - dockerfile: ./docker/discovery/Dockerfile + dockerfile: ./docker/repository/Dockerfile ports: - "8080:80" volumes: From 456802b4c8eb7a4ed1a94e218f1373e431d6eef1 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Fri, 18 Sep 2026 14:38:12 +0200 Subject: [PATCH 4/6] Fix copy step in `build-server` action --- .github/actions/build-server/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/build-server/action.yml b/.github/actions/build-server/action.yml index c9fe71bec..af8228474 100644 --- a/.github/actions/build-server/action.yml +++ b/.github/actions/build-server/action.yml @@ -58,6 +58,7 @@ runs: - name: Copy LICENSE into build directory working-directory: ./server + shell: bash run: cp ../LICENSE . - name: Build Docker Image From 72c1d0d64a53f291c41f299d1f13cafbfd50a49c Mon Sep 17 00:00:00 2001 From: s-heppner Date: Mon, 21 Sep 2026 11:02:33 +0200 Subject: [PATCH 5/6] server: Update docs for the new docker build context Previously, the example configuration READMEs still stated that the build context must be the repository root, `CONTRIBUTING.md` showed an outdated `docker build` command, and the Docker Hub link in the server `README.md` pointed to the old `basyx-python-server` image. This change updates them to match the build introduced in this branch: images are built from the `server` directory with the `sdk` directory passed in as a named build context. The registry README also pointed to the repository Dockerfile, which is corrected as well. --- CONTRIBUTING.md | 7 ++++--- server/README.md | 2 +- .../example_configurations/registry_standalone/README.md | 2 +- .../example_configurations/repository_standalone/README.md | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e6c103cc..d7095370b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -185,12 +185,13 @@ To test that the server is working, we expect to at least be able to build the d of it without error. For that, you need to have Docker installed on your system. -In the directory with the `Dockerfile`: +In the `server` directory: ```bash ruff check -docker build -t basyx-python-server . -docker run --name basyx-python-server basyx-python-server +docker build -t basyx-python-repository -f docker/repository/Dockerfile --build-context sdk=../sdk . +docker run --name basyx-python-repository basyx-python-repository ``` +Replace `repository` with `discovery` or `registry` to test the other server profiles. Wait until you see the line: ``` INFO success: quit_on_failure entered RUNNING state diff --git a/server/README.md b/server/README.md index 0adb1aa86..52e85ff60 100644 --- a/server/README.md +++ b/server/README.md @@ -149,7 +149,7 @@ This Dockerfile is inspired by the [tiangolo/uwsgi-nginx-docker][10] repository. [8]: https://basyx-python-sdk.readthedocs.io/en/latest/adapter/json.html [9]: https://basyx-python-sdk.readthedocs.io/en/latest/adapter/xml.html [10]: https://github.com/tiangolo/uwsgi-nginx-docker -[11]: https://hub.docker.com/r/eclipsebasyx/basyx-python-server +[11]: https://hub.docker.com/r/eclipsebasyx/basyx-python-repository [12]: https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShellRegistryServiceSpecification/V3.1.1_SSP-001 [13]: https://app.swaggerhub.com/apis/Plattform_i40/DiscoveryServiceSpecification/V3.1.1_SSP-001 [14]: https://app.swaggerhub.com/apis/Plattform_i40/SubmodelRegistryServiceSpecification/V3.1.1_SSP-001 diff --git a/server/example_configurations/registry_standalone/README.md b/server/example_configurations/registry_standalone/README.md index 63d6dd8ee..8d8005408 100644 --- a/server/example_configurations/registry_standalone/README.md +++ b/server/example_configurations/registry_standalone/README.md @@ -50,5 +50,5 @@ Input files are read from `./input` and stored persistently under `./storage` on The server can be accessed at http://localhost:8083/api/v3.1.1/ from your host system. To get a different setup, the `compose.yaml` file can be adapted using the options described in the main server [README.md](../../README.md#options). -Note that the `Dockerfile` has to be specified explicitly via `dockerfile: server/docker/repository/Dockerfile`, as the build context must be set to the repository root to allow access to the local `/sdk`. +Note that the image is built from the `server` directory. The local `sdk` directory is passed in as an additional build context named `sdk`. diff --git a/server/example_configurations/repository_standalone/README.md b/server/example_configurations/repository_standalone/README.md index ce84c5f67..47dbe2bd3 100644 --- a/server/example_configurations/repository_standalone/README.md +++ b/server/example_configurations/repository_standalone/README.md @@ -11,5 +11,5 @@ Input files are read from `./input` and stored persistently under `./storage` on The server can be accessed at http://localhost:8080/api/v3.0/ from your host system. To get a different setup, the `compose.yaml` file can be adapted using the options described in the main server [README.md](../../README.md#options). -Note that the `Dockerfile` has to be specified explicitly via `dockerfile: server/docker/repository/Dockerfile`, as the build context must be set to the repository root to allow access to the local `/sdk`. +Note that the image is built from the `server` directory. The local `sdk` directory is passed in as an additional build context named `sdk`. From 5a246c71f496d8bf0be1fa2fa8852588da7c0acc Mon Sep 17 00:00:00 2001 From: hpoeche Date: Tue, 22 Sep 2026 18:40:24 +0200 Subject: [PATCH 6/6] Pass `LICENSE` via additional build context In the first version of these changes the `LICENSE` file from the repository root was copied in a CI step to the `/server` directory to include it into the Docker image builds. This lead to failing local builds on dev machines. To fix this the builds of all three server profiles now depend on a second additional build context `license`, which must hold the `LICENSE` file. Because Docker only allows directorie to be passed as additional build contexts, the `license` context is set to the repository root. These changes are documented in the contribution guide and all `README`s of the server's example configurations. --- .github/actions/build-server/action.yml | 6 +----- CONTRIBUTING.md | 2 +- server/README.md | 7 ++++--- server/docker/discovery/Dockerfile | 2 +- server/docker/registry/Dockerfile | 2 +- server/docker/repository/Dockerfile | 2 +- .../discovery_standalone/README.md | 14 ++++++++------ .../{compose.yml => compose.dev.yml} | 1 + .../registry_standalone/README.md | 13 +++++++------ .../{compose.yml => compose.dev.yml} | 1 + .../repository_standalone/README.md | 12 ++++++------ .../{compose.yaml => compose.dev.yml} | 1 + 12 files changed, 33 insertions(+), 30 deletions(-) rename server/example_configurations/discovery_standalone/{compose.yml => compose.dev.yml} (92%) rename server/example_configurations/registry_standalone/{compose.yml => compose.dev.yml} (91%) rename server/example_configurations/repository_standalone/{compose.yaml => compose.dev.yml} (92%) diff --git a/.github/actions/build-server/action.yml b/.github/actions/build-server/action.yml index af8228474..cf88963ff 100644 --- a/.github/actions/build-server/action.yml +++ b/.github/actions/build-server/action.yml @@ -56,11 +56,6 @@ runs: org.opencontainers.image.source=https://github.com/eclipse-basyx/basyx-python-sdk/tree/main/server org.opencontainers.image.licenses=MIT - - name: Copy LICENSE into build directory - working-directory: ./server - shell: bash - run: cp ../LICENSE . - - name: Build Docker Image id: build uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a #v7.3.0 @@ -68,6 +63,7 @@ runs: context: ./server build-contexts: | sdk=./sdk + license=. file: ./server/docker/${{ inputs.server-profile }}/Dockerfile tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7095370b..340521c32 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -188,7 +188,7 @@ For that, you need to have Docker installed on your system. In the `server` directory: ```bash ruff check -docker build -t basyx-python-repository -f docker/repository/Dockerfile --build-context sdk=../sdk . +docker build -t basyx-python-repository -f docker/repository/Dockerfile --build-context sdk=../sdk --build-context license=.. . docker run --name basyx-python-repository basyx-python-repository ``` Replace `repository` with `discovery` or `registry` to test the other server profiles. diff --git a/server/README.md b/server/README.md index 52e85ff60..9915971e9 100644 --- a/server/README.md +++ b/server/README.md @@ -30,11 +30,12 @@ $ docker pull eclipsebasyx/basyx-python-repository: ## Building -If you need to build an image locally (e.g. for development) you first have to copy the `LICENSE` file from the repository root -into this directory. Then run the following build command in this directory: +If you need to build an image locally (e.g. for development) run the following build command in this directory: ``` -$ docker build -t basyx-python-repository -f docker/repository/Dockerfile --build-context sdk=../sdk . +$ docker build -t basyx-python-repository -f docker/repository/Dockerfile --build-context sdk=../sdk --build-context license=.. . ``` +Note that the image is built from the `server` directory. The local `sdk` directory is passed in as an additional build context named `sdk`. +To include the package license, a second additional build context `license` passes in the repository root. Note that when cloning this repository on Windows, Git may convert the line separators to CRLF. This breaks [`entrypoint.sh`](docker/repository/entrypoint.sh) and [`stop-supervisor.sh`](docker/common/stop-supervisor.sh). Ensure both files use LF line separators (`\n`) before building. diff --git a/server/docker/discovery/Dockerfile b/server/docker/discovery/Dockerfile index 2082613e7..f131592df 100644 --- a/server/docker/discovery/Dockerfile +++ b/server/docker/discovery/Dockerfile @@ -16,8 +16,8 @@ RUN apk update && \ apk del git bash COPY --from=sdk . /sdk +COPY --from=license ./LICENSE /server/LICENSE COPY ./app /server/app -COPY ./LICENSE /LICENSE COPY ./pyproject.toml /server/pyproject.toml COPY ./docker/discovery/uwsgi.ini /etc/uwsgi/ COPY ./docker/common/supervisord.ini /etc/supervisor/conf.d/supervisord.ini diff --git a/server/docker/registry/Dockerfile b/server/docker/registry/Dockerfile index e1e44daf2..445b50815 100644 --- a/server/docker/registry/Dockerfile +++ b/server/docker/registry/Dockerfile @@ -16,8 +16,8 @@ RUN apk update && \ apk del git bash COPY --from=sdk . /sdk +COPY --from=license ./LICENSE /server/LICENSE COPY ./app /server/app -COPY ./LICENSE /LICENSE COPY ./pyproject.toml /server/pyproject.toml COPY ./docker/registry/uwsgi.ini /etc/uwsgi/ COPY ./docker/common/supervisord.ini /etc/supervisor/conf.d/supervisord.ini diff --git a/server/docker/repository/Dockerfile b/server/docker/repository/Dockerfile index e1ffcc1c3..500eb8704 100644 --- a/server/docker/repository/Dockerfile +++ b/server/docker/repository/Dockerfile @@ -18,8 +18,8 @@ RUN apk update && \ # Copy only the files we need to run the container # The argumentation for this is to keep the containers as slim as possible. COPY --from=sdk . /sdk +COPY --from=license ./LICENSE /server/LICENSE COPY ./app /server/app -COPY ./LICENSE /LICENSE COPY ./pyproject.toml /server/pyproject.toml COPY ./docker/repository/uwsgi.ini /etc/uwsgi/ COPY ./docker/common/supervisord.ini /etc/supervisor/conf.d/supervisord.ini diff --git a/server/example_configurations/discovery_standalone/README.md b/server/example_configurations/discovery_standalone/README.md index 7bc2f1324..69916a891 100644 --- a/server/example_configurations/discovery_standalone/README.md +++ b/server/example_configurations/discovery_standalone/README.md @@ -20,12 +20,13 @@ The Discovery Service stores and retrieves relations between AAS identifiers and ## Configuration -This example Docker compose configuration starts a discovery server. - -The container image can also be built and run via: +The example Docker compose configuration `compose.dev.yml` builds a discovery server locally. This is usually only necessary +for development: ``` -$ docker compose up +$ docker compose up -f compose.dev.yml ``` +To just run the discovery server, use the pre-built image `eclipsebasyx/basyx-python-discovery:latest` +on [DockerHub](https://hub.docker.com/r/eclipsebasyx/basyx-python-discovery). ## Persistence @@ -33,7 +34,7 @@ The discovery service can run in persistent or non-persistent mode. ### Persistent Mode -Persistent mode configuration is provided in the `compose.yaml`. +Persistent mode configuration is provided in the `compose.dev.yaml`. Only the AAS-to-asset-ID mapping is persisted. The reverse lookup index is rebuilt in memory when the service starts. @@ -43,4 +44,5 @@ If `storage_path` is not set, the discovery service runs in memory only. ## Notes - Stop the service before manually editing `discovery_store.json`. - +- Note that the image is built from the `server` directory. The local `sdk` directory is passed in as an additional build context named `sdk`. +To include the package license, a second additional build context `license` passes in the repository root. diff --git a/server/example_configurations/discovery_standalone/compose.yml b/server/example_configurations/discovery_standalone/compose.dev.yml similarity index 92% rename from server/example_configurations/discovery_standalone/compose.yml rename to server/example_configurations/discovery_standalone/compose.dev.yml index 788b335cd..6682b0a55 100644 --- a/server/example_configurations/discovery_standalone/compose.yml +++ b/server/example_configurations/discovery_standalone/compose.dev.yml @@ -5,6 +5,7 @@ services: context: ../.. additional_contexts: - sdk=../../../sdk + - license=../../.. dockerfile: ./docker/discovery/Dockerfile ports: - "8084:80" diff --git a/server/example_configurations/registry_standalone/README.md b/server/example_configurations/registry_standalone/README.md index 8d8005408..762386cf3 100644 --- a/server/example_configurations/registry_standalone/README.md +++ b/server/example_configurations/registry_standalone/README.md @@ -39,16 +39,17 @@ The Registry Service provides the endpoint for a given AAS-ID or Submodel-ID. Su ## Configuration -This example Docker compose configuration starts a registry server. - -The container image can also be built and run via: +The example Docker compose configuration `compose.dev.yml` builds a registry server locally. This is usually only necessary +for development: ``` -$ docker compose up +$ docker compose up -f compose.dev.yml ``` +To just run the registry server, use the pre-built image `eclipsebasyx/basyx-python-registry:latest` +on [DockerHub](https://hub.docker.com/r/eclipsebasyx/basyx-python-registry). Input files are read from `./input` and stored persistently under `./storage` on your host system. The server can be accessed at http://localhost:8083/api/v3.1.1/ from your host system. -To get a different setup, the `compose.yaml` file can be adapted using the options described in the main server [README.md](../../README.md#options). +To get a different setup, the `compose.dev.yaml` file can be adapted using the options described in the main server [README.md](../../README.md#options). Note that the image is built from the `server` directory. The local `sdk` directory is passed in as an additional build context named `sdk`. - +To include the package license, a second additional build context `license` passes in the repository root. diff --git a/server/example_configurations/registry_standalone/compose.yml b/server/example_configurations/registry_standalone/compose.dev.yml similarity index 91% rename from server/example_configurations/registry_standalone/compose.yml rename to server/example_configurations/registry_standalone/compose.dev.yml index 88462401a..6f8e6a825 100644 --- a/server/example_configurations/registry_standalone/compose.yml +++ b/server/example_configurations/registry_standalone/compose.dev.yml @@ -4,6 +4,7 @@ services: context: ../.. additional_contexts: - sdk=../../../sdk + - license=../../.. dockerfile: ./docker/registry/Dockerfile ports: - "8083:80" diff --git a/server/example_configurations/repository_standalone/README.md b/server/example_configurations/repository_standalone/README.md index 47dbe2bd3..736230689 100644 --- a/server/example_configurations/repository_standalone/README.md +++ b/server/example_configurations/repository_standalone/README.md @@ -1,15 +1,15 @@ # Repository Standalone - -This example Docker compose configuration starts a repository server. - -The container image can also be built and run via: +The example Docker compose configuration `compose.dev.yml` builds a repository server locally. This is usually only necessary +for development: ``` -$ docker compose up +$ docker compose up -f compose.dev.yml ``` +To just run the repository server, use the pre-built image `eclipsebasyx/basyx-python-repository` +on [DockerHub](https://hub.docker.com/r/eclipsebasyx/basyx-python-repository). Input files are read from `./input` and stored persistently under `./storage` on your host system. The server can be accessed at http://localhost:8080/api/v3.0/ from your host system. To get a different setup, the `compose.yaml` file can be adapted using the options described in the main server [README.md](../../README.md#options). Note that the image is built from the `server` directory. The local `sdk` directory is passed in as an additional build context named `sdk`. - +To include the package license, a second additional build context `license` passes in the repository root. diff --git a/server/example_configurations/repository_standalone/compose.yaml b/server/example_configurations/repository_standalone/compose.dev.yml similarity index 92% rename from server/example_configurations/repository_standalone/compose.yaml rename to server/example_configurations/repository_standalone/compose.dev.yml index 76074a0a3..a81e59917 100644 --- a/server/example_configurations/repository_standalone/compose.yaml +++ b/server/example_configurations/repository_standalone/compose.dev.yml @@ -5,6 +5,7 @@ services: context: ../.. additional_contexts: - sdk=../../../sdk + - license=../../.. dockerfile: ./docker/repository/Dockerfile ports: - "8080:80"