Files
mirsal aa47e38536 Initial release
This is a matrix bot which announces the lol hackerspace's
open / closed state to a list of matrix rooms, it is based
on rumqtt and matrix-rust-sdk. The bot connects to the
configured matrix homeserver and an MQTT broker broadcasting
changes in the door sensor state
2026-09-14 09:18:54 +00:00

26 lines
619 B
Docker

FROM rust:1.98.1-slim-trixie AS build
RUN USER=root cargo new --bin matrix-feedbot
WORKDIR /matrix-lolopener
COPY Cargo.lock ./
COPY Cargo.toml ./
RUN apt-get update && apt-get install -y --no-install-recommends libssl-dev pkg-config
# cache dependencies
RUN cargo build --release
RUN rm src/*.rs
COPY src ./src
RUN rm target/release/deps/matrix_lolopener*
RUN cargo build --release
FROM debian:trixie-slim
RUN apt-get update && apt-get install -y --no-install-recommends libssl3 ca-certificates && apt-get clean
COPY --from=build /matrix-lolopener/target/release/matrix-lolopener .
CMD ["./matrix-lolopener"]