A round robin service to collect data from sensors in the greenhouse
- Run SensorDataCollector eclipse launch file
We build docker container images to run using docker-compose
To build the container
- Build the jar file
Either the "greenhouse - sensor_data_collector - clean install" Eclipse Launch File
Or run
mvn install
inside the folder - Open terminal inside the workspace root directory (it contains the Dockerfile)
- Build docker image (You will need docker installed on your computer)
docker build --build-arg JAR_FILE=target/sensor_data_collector-VERSION-jar-with-dependencies.jar -t tcrokicki/ptk-greenhouse-app-sensor_data_collector:vVERSION .
docker build --build-arg JAR_FILE=target/sensor_data_collector-1.0.3-jar-with-dependencies.jar -t tcrokicki/ptk-greenhouse-app-sensor_data_collector:v1.0.3.1 .
docker buildx build --platform=linux/amd64,linux/arm64 --build-arg JAR_FILE=target/sensor_data_collector-1.0.3-jar-with-dependencies.jar -t tcrokicki/ptk-greenhouse-app-sensor_data_collector:v1.0.3.2 .
docker buildx build --build-arg JAR_FILE=target/sensor_data_collector-1.0.2-jar-with-dependencies.jar -t tcrokicki/ptk-greenhouse-app-sensor_data_collector:v1.0.2.12 ./
- Push to Docker Hub when ready for release
docker push tcrokicki/ptk-greenhouse-app-sensor_data_collector:vVERSION
docker login --username USERNAME
docker run --env xxx='zzzz' tcrokicki/ptk-greenhouse-app-sensor_data_collector:VERSION