telegraf socket input processor to receive MQTT-Homie-v4 messages
166
Version
Easiest way to use it is with docker-compose create
version: "3.5"
services:
homie-input:
build:
context: .
dockerfile: Dockerfile
image: rabarar/homie-input:0.1.0
network_mode: "bridge"
pid: "host"
container_name: homie-input
environment:
- HOMIE_MQTT_USERNAME=admin
- HOMIE_MQTT_PASSWORD=password
- HOMIE_INFLUX_KEY=XXXXXXXXX
- HOMIEGRAF_LEVEL=info
restart: always
Use the Dockerfile:
FROM rust:1.68 as build
# create a new empty shell project
RUN USER=root cargo new --bin homie-input
WORKDIR /homie-input
# copy over your manifests
COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
# this build step will cache your dependencies
RUN cargo build --release
RUN rm src/*.rs
# copy your source tree
COPY ./src ./src
# build for release
RUN rm ./target/release/deps/homie_input*
RUN cargo build --release
# our final base
FROM rust:1.68
# copy the build artifact from the build stage
COPY --from=build /homie-input/target/release/homie-input .
# set the startup command to run your binary
ENTRYPOINT ["/homie-input", "-x", "influx", "-i", "8086", "-g", "10402q-MD", "-o", "homie"]
Content type
Image
Digest
sha256:9dee3db19…
Size
536 MB
Last updated
over 3 years ago
docker pull rabarar/homie-input:0.1.0