From 6e065f2496004fca7bc2a782f51b87c3debe58d2 Mon Sep 17 00:00:00 2001 From: Paul Gerber Date: Thu, 8 Oct 2026 18:05:49 +0200 Subject: [PATCH 1/2] server: Add `image:`-based compose files alongside `compose.dev.yml` Previously, the example configurations in `example_configurations/` only had `compose.dev.yml`, which builds the image locally from source. The READMEs already referenced the pre-built DockerHub images by name, but there was no compose file that actually used them. This adds a `compose.yml` per profile (repository, registry, discovery) that pulls the matching `eclipsebasyx/basyx-python-*:latest` image instead of building. `docker compose up` now uses the published image by default; `docker compose -f compose.dev.yml up` remains the explicit way to build from source for development. Fixes #640 --- .../discovery_standalone/README.md | 15 +++++++++------ .../discovery_standalone/compose.yml | 10 ++++++++++ .../registry_standalone/README.md | 15 +++++++++------ .../registry_standalone/compose.yml | 10 ++++++++++ .../repository_standalone/README.md | 15 +++++++++------ .../repository_standalone/compose.yml | 11 +++++++++++ 6 files changed, 58 insertions(+), 18 deletions(-) create mode 100644 server/example_configurations/discovery_standalone/compose.yml create mode 100644 server/example_configurations/registry_standalone/compose.yml create mode 100644 server/example_configurations/repository_standalone/compose.yml diff --git a/server/example_configurations/discovery_standalone/README.md b/server/example_configurations/discovery_standalone/README.md index 6acc02c3..583c0ad0 100644 --- a/server/example_configurations/discovery_standalone/README.md +++ b/server/example_configurations/discovery_standalone/README.md @@ -20,13 +20,16 @@ The Discovery Service stores and retrieves relations between AAS identifiers and ## Configuration -The example Docker compose configuration `compose.dev.yml` builds a discovery server locally. This is usually only necessary -for development: +This example Docker compose configuration runs a discovery server using the pre-built +`eclipsebasyx/basyx-python-discovery:latest` image from [DockerHub](https://hub.docker.com/r/eclipsebasyx/basyx-python-discovery): +``` +$ docker compose up +``` + +To build the image locally from source instead, use `compose.dev.yml`. This is usually only necessary for development: ``` $ docker compose -f compose.dev.yml up ``` -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 @@ -34,7 +37,7 @@ The discovery service can run in persistent or non-persistent mode. ### Persistent Mode -Persistent mode configuration is provided in the `compose.dev.yml`. +Persistent mode configuration is provided in both `compose.yml` and `compose.dev.yml`. Only the AAS-to-asset-ID mapping is persisted. The reverse lookup index is rebuilt in memory when the service starts. @@ -44,5 +47,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`. +- `compose.dev.yml` builds the image 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.yml new file mode 100644 index 00000000..46990b4c --- /dev/null +++ b/server/example_configurations/discovery_standalone/compose.yml @@ -0,0 +1,10 @@ +name: basyx-python-server +services: + app: + image: eclipsebasyx/basyx-python-discovery:latest + ports: + - "8084:80" + environment: + storage_path: /storage/discovery_store.json + volumes: + - ./storage:/storage diff --git a/server/example_configurations/registry_standalone/README.md b/server/example_configurations/registry_standalone/README.md index b78ccae3..b2c2e32e 100644 --- a/server/example_configurations/registry_standalone/README.md +++ b/server/example_configurations/registry_standalone/README.md @@ -39,17 +39,20 @@ The Registry Service provides the endpoint for a given AAS-ID or Submodel-ID. Su ## Configuration -The example Docker compose configuration `compose.dev.yml` builds a registry server locally. This is usually only necessary -for development: +This example Docker compose configuration runs a registry server using the pre-built +`eclipsebasyx/basyx-python-registry:latest` image from [DockerHub](https://hub.docker.com/r/eclipsebasyx/basyx-python-registry): +``` +$ docker compose up +``` + +To build the image locally from source instead, use `compose.dev.yml`. This is usually only necessary for development: ``` $ docker compose -f compose.dev.yml up ``` -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.dev.yml` file can be adapted using the options described in the main server [README.md](../../README.md#options). +To get a different setup, the `compose.yml` (or `compose.dev.yml`) 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`. +Note that `compose.dev.yml` builds the image 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.yml new file mode 100644 index 00000000..ea49877e --- /dev/null +++ b/server/example_configurations/registry_standalone/compose.yml @@ -0,0 +1,10 @@ +services: + app: + image: eclipsebasyx/basyx-python-registry:latest + ports: + - "8083:80" + volumes: + - ./input:/input + - ./storage:/storage + environment: + STORAGE_PERSISTENCY: True diff --git a/server/example_configurations/repository_standalone/README.md b/server/example_configurations/repository_standalone/README.md index 5413100b..9c45c930 100644 --- a/server/example_configurations/repository_standalone/README.md +++ b/server/example_configurations/repository_standalone/README.md @@ -1,15 +1,18 @@ # Repository Standalone -The example Docker compose configuration `compose.dev.yml` builds a repository server locally. This is usually only necessary -for development: +This example Docker compose configuration runs a repository server using the pre-built +`eclipsebasyx/basyx-python-repository` image from [DockerHub](https://hub.docker.com/r/eclipsebasyx/basyx-python-repository): +``` +$ docker compose up +``` + +To build the image locally from source instead, use `compose.dev.yml`. This is usually only necessary for development: ``` $ docker compose -f compose.dev.yml up ``` -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.dev.yml` file can be adapted using the options described in the main server [README.md](../../README.md#options). +To get a different setup, the `compose.yml` (or `compose.dev.yml`) 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`. +Note that `compose.dev.yml` builds the image 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.yml b/server/example_configurations/repository_standalone/compose.yml new file mode 100644 index 00000000..2d4c002a --- /dev/null +++ b/server/example_configurations/repository_standalone/compose.yml @@ -0,0 +1,11 @@ +name: basyx-python-server +services: + app: + image: eclipsebasyx/basyx-python-repository:latest + ports: + - "8080:80" + volumes: + - ./input:/input + - ./storage:/storage + environment: + STORAGE_PERSISTENCY: True From c62028192a532ddc8721240411888de118193f08 Mon Sep 17 00:00:00 2001 From: Paul Gerber Date: Thu, 8 Oct 2026 18:15:15 +0200 Subject: [PATCH 2/2] Fix stale API base path in example_configurations READMEs --- .../registry_standalone/README.md | 36 +++++++++---------- .../repository_standalone/README.md | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/server/example_configurations/registry_standalone/README.md b/server/example_configurations/registry_standalone/README.md index b2c2e32e..1358d9e2 100644 --- a/server/example_configurations/registry_standalone/README.md +++ b/server/example_configurations/registry_standalone/README.md @@ -13,27 +13,27 @@ The Registry Service provides the endpoint for a given AAS-ID or Submodel-ID. Su # AAS Registry: | Function | Description | Example URL | |--------------------------------------------------|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------| -| **GetAllAssetAdministrationShellDescriptors** | Return all AAS descriptor | `GET http://localhost:8083/api/v3.1.1/shell-descriptors` | -| **GetAssetAdministrationShellDescriptorById** | Return a specific AAS descriptor | `GET http://localhost:8083/api/v3.1.1/shell-descriptors/{aasIdentifier}` | -| **PostAssetAdministrationShellDescriptor** | Register/create a new AAS descriptor | `POST http://localhost:8083/api/v3.1.1/shell-descriptors` | -| **PutAssetAdministrationShellDescriptorById** | Create or update an existing AAS descriptor | `PUT http://localhost:8083/api/v3.1.1/shell-descriptors/{aasIdentifier}` | -| **DeleteAssetAdministrationShellDescriptorById** | Delete an AAS descriptor by ID | `DELETE http://localhost:8083/api/v3.1.1/shell-descriptors/{aasIdentifier}` | -| **GetSubmodelDescriptorsThroughSuperPath** | Return all submodel descriptors under AAS descriptor | `GET http://localhost:8083/api/v3.1.1/shell-descriptors/{aasIdentifier}/submodel-descriptors` | -| **PostSubmodelDescriptorThroughSuperPath** | Register/create a new submodel descriptor under AAS descriptor | `POST http://localhost:8083/api/v3.1.1/shell-descriptors/{aasIdentifier}/submodel-descriptors` | -| **GetSubmodelDescriptorThroughSuperPath** | Return a specific submodel descriptor under AAS descriptor | `GET http://localhost:8083/api/v3.1.1/shell-descriptors/{aasIdentifier}/submodel-descriptors/{submodelIdentifier}` | -| **PutSubmodelDescriptorThroughSuperPath** | Create or update a specific submodel descriptor under AAS descriptor | `PUT http://localhost:8083/api/v3.1.1/shell-descriptors/{aasIdentifier}/submodel-descriptors/{submodelIdentifier}` | -| **DeleteSubmodelDescriptorThroughSuperPath** | Delete a specific submodel descriptor under AAS descriptor | `DELETE http://localhost:8083/api/v3.1.1/shell-descriptors/{aasIdentifier}/submodel-descriptors/{submodelIdentifier}` | -| **GetDescription** | Return the self‑description of the AAS registry service | `GET http://localhost:8083/api/v3.1.1/description` | +| **GetAllAssetAdministrationShellDescriptors** | Return all AAS descriptor | `GET http://localhost:8083/api/v3.1/shell-descriptors` | +| **GetAssetAdministrationShellDescriptorById** | Return a specific AAS descriptor | `GET http://localhost:8083/api/v3.1/shell-descriptors/{aasIdentifier}` | +| **PostAssetAdministrationShellDescriptor** | Register/create a new AAS descriptor | `POST http://localhost:8083/api/v3.1/shell-descriptors` | +| **PutAssetAdministrationShellDescriptorById** | Create or update an existing AAS descriptor | `PUT http://localhost:8083/api/v3.1/shell-descriptors/{aasIdentifier}` | +| **DeleteAssetAdministrationShellDescriptorById** | Delete an AAS descriptor by ID | `DELETE http://localhost:8083/api/v3.1/shell-descriptors/{aasIdentifier}` | +| **GetSubmodelDescriptorsThroughSuperPath** | Return all submodel descriptors under AAS descriptor | `GET http://localhost:8083/api/v3.1/shell-descriptors/{aasIdentifier}/submodel-descriptors` | +| **PostSubmodelDescriptorThroughSuperPath** | Register/create a new submodel descriptor under AAS descriptor | `POST http://localhost:8083/api/v3.1/shell-descriptors/{aasIdentifier}/submodel-descriptors` | +| **GetSubmodelDescriptorThroughSuperPath** | Return a specific submodel descriptor under AAS descriptor | `GET http://localhost:8083/api/v3.1/shell-descriptors/{aasIdentifier}/submodel-descriptors/{submodelIdentifier}` | +| **PutSubmodelDescriptorThroughSuperPath** | Create or update a specific submodel descriptor under AAS descriptor | `PUT http://localhost:8083/api/v3.1/shell-descriptors/{aasIdentifier}/submodel-descriptors/{submodelIdentifier}` | +| **DeleteSubmodelDescriptorThroughSuperPath** | Delete a specific submodel descriptor under AAS descriptor | `DELETE http://localhost:8083/api/v3.1/shell-descriptors/{aasIdentifier}/submodel-descriptors/{submodelIdentifier}` | +| **GetDescription** | Return the self‑description of the AAS registry service | `GET http://localhost:8083/api/v3.1/description` | # Submodel Registry: | Function | Description | Example URL | |----------------------------------|--------------------------------------------------------------|-----------------------------------------------------------------------------------| -| **GetAllSubmodelDescriptors** | Return all submodel descriptors | `GET http://localhost:8083/api/v3.0/submodel-descriptors` | -| **PostSubmodelDescriptor** | Register/create a new submodel descriptor | `POST http://localhost:8083/api/v3.0/submodel-descriptors` | -| **GetSubmodelDescriptorById** | Return a specific submodel descriptor | `GET http://localhost:8083/api/v3.0/submodel-descriptors/{submodelIdentifier}` | -| **PutSubmodelDescriptorById** | Create or update a specific submodel descriptor | `PUT http://localhost:8083/api/v3.0/submodel-descriptors/{submodelIdentifier}` | -| **DeleteSubmodelDescriptorById** | Delete a specific submodel descriptor | `DELETE http://localhost:8083/api/v3.0/submodel-descriptors/{submodelIdentifier}` | -| **GetDescription** | Return the self‑description of the submodel registry service | `GET http://localhost:8083/api/v3.0/description` | +| **GetAllSubmodelDescriptors** | Return all submodel descriptors | `GET http://localhost:8083/api/v3.1/submodel-descriptors` | +| **PostSubmodelDescriptor** | Register/create a new submodel descriptor | `POST http://localhost:8083/api/v3.1/submodel-descriptors` | +| **GetSubmodelDescriptorById** | Return a specific submodel descriptor | `GET http://localhost:8083/api/v3.1/submodel-descriptors/{submodelIdentifier}` | +| **PutSubmodelDescriptorById** | Create or update a specific submodel descriptor | `PUT http://localhost:8083/api/v3.1/submodel-descriptors/{submodelIdentifier}` | +| **DeleteSubmodelDescriptorById** | Delete a specific submodel descriptor | `DELETE http://localhost:8083/api/v3.1/submodel-descriptors/{submodelIdentifier}` | +| **GetDescription** | Return the self‑description of the submodel registry service | `GET http://localhost:8083/api/v3.1/description` | @@ -51,7 +51,7 @@ $ docker compose -f compose.dev.yml up ``` 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. +The server can be accessed at http://localhost:8083/api/v3.1/ from your host system. To get a different setup, the `compose.yml` (or `compose.dev.yml`) file can be adapted using the options described in the main server [README.md](../../README.md#options). Note that `compose.dev.yml` builds the image 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 9c45c930..d415cc8a 100644 --- a/server/example_configurations/repository_standalone/README.md +++ b/server/example_configurations/repository_standalone/README.md @@ -11,7 +11,7 @@ $ docker compose -f compose.dev.yml up ``` 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. +The server can be accessed at http://localhost:8080/api/v3.1/ from your host system. To get a different setup, the `compose.yml` (or `compose.dev.yml`) file can be adapted using the options described in the main server [README.md](../../README.md#options). Note that `compose.dev.yml` builds the image from the `server` directory. The local `sdk` directory is passed in as an additional build context named `sdk`.