Skip to content

Commit

Permalink
Add some docs around dockerization (eclipse-uprotocol#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherDaniel authored Aug 1, 2024
1 parent c243148 commit 0680419
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,19 @@ cargo run --features zenoh -- -t zenoh -a usubscription.local -v
```

`up-subscription-cli` can be used with any uProtocol rust transport implementation - the available options are controlled as cargo features, refer to the definitions in the `[features]` section of up-subscription-cli `Cargo.toml`. Currently supported are [zenoh](https://github.com/eclipse-uprotocol/up-transport-zenoh-rust) and [socket](https://github.com/eclipse-uprotocol/up-transport-socket) transports, with [mqtt](https://github.com/eclipse-uprotocol/up-transport-mqtt5-rust) to follow as soon as they move over to using the up-rust release version from crates.io.

### Running with docker

The `up-subscription-cli` also can be built and run using docker and docker-compose. The top-level `Dockerfile` and `docker-compose.yaml` are provided for that purpose. `up-subscription-cli` can be provided with configuration parameters both via cli arguments, as well as environment variables. For reference on these, please refer to `docker-compose.yaml`. Please note that this configuration is provided mainly for demonstration purposes - for a production deployment, you want to revisit e.g. the network settings used by the container.

To build the container, in the project root run

```console
docker build -t up-subscription .
```

To run (and auto-build if required) the container, in the project root run

```console
docker-compose up
```
3 changes: 3 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ services:
- AUTHORITY=usubscription.local
- TRANSPORT=zenoh
- VERBOSE=true

# - SUBSCRIPTION_BUFFER=1024
# - NOTIFICATION_BUFFER=1024

0 comments on commit 0680419

Please sign in to comment.