diff --git a/README.md b/README.md index 8285432..b000e8e 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,26 @@ This is a Java application that exports metrics from a Digital Devices OctopusNE ## How to run? -* Option 1: Set the OCTONET_IP environment variable to the IP address of your OctopusNET device and run the application using `mvn exec:java`. -* Option 2: There's are pre-built binary supplied in the download archive. You can use this by setting the OCTONET_IP environment variable to the IP address of your OctopusNET device and then run the application using `java -jar octonet-exporter-1.0-SNAPSHOT-jar-with-dependencies.jar`. -* Option 3 (recommended): Use the provided Dockerfile to build a container and run this application in Docker or Podman. Don't forget to supply an `-e OCTONET_IP=` to the container. +### Option 1: Using Maven +This requires an installed Java Development Kit (JDK) version 17 or higher. + +Set the OCTONET_IP environment variable to the IP address of your OctopusNET device and run the application using `mvn exec:java`. + +#### Option 2: Using the precompiled binary +This requires an installed Java Runtime Environment (JRE) version 17 or higher. +There's a pre-built binary supplied in the download archive. You can use this by setting the OCTONET_IP environment variable to the IP address of your OctopusNET device and then run the application using `java -jar octonet-exporter-1.0-SNAPSHOT-jar-with-dependencies.jar`. + +HINT: If you're using a Unix-based system like macOS or Linux, you can manipulate the environment variables non-permanently on the fly by using something like `OCTONET_IP=172.20.20.121 java -jar octonet-exporter-1.0-SNAPSHOT-jar-with-dependencies.jar` + +### Option 3 (recommended): Using Docker or Podman +Use the provided Dockerfile to build a container and run this application in Docker or Podman. Don't forget to supply an `-e OCTONET_IP=` to the container. + +For example: + +```bash +docker build -t octonet-exporter . +docker run -d -p 9401:9401 -e OCTONET_IP=172.20.20.121 octonet-exporter +``` ## How to compile a binary?