diff --git a/README.md b/README.md index 41462b6..926a32f 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ A collection of delicious docker recipes. ## IoT - [x] ~hass~ +- [x] flashmq - [x] hbdg - [x] node-red :+1: - [x] mqtt-io-arm diff --git a/flashmq/Dockerfile b/flashmq/Dockerfile new file mode 100644 index 0000000..1ea9a63 --- /dev/null +++ b/flashmq/Dockerfile @@ -0,0 +1,29 @@ +# +# Dockerfile for flashmq +# + +FROM debian:12 +MAINTAINER EasyPi Software Foundation + +RUN set -xe \ + && apt update -y \ + && apt install -y --no-install-recommends apt-utils ca-certificates curl gpg \ + && update-ca-certificates -f \ + && curl -sSL https://www.flashmq.org/wp-content/uploads/2021/10/flashmq-repo.gpg \ + | gpg --dearmor \ + | tee /usr/share/keyrings/flashmq-repo.gpg > /dev/null \ + && echo 'deb [signed-by=/usr/share/keyrings/flashmq-repo.gpg] http://repo.flashmq.org/apt bookworm main' \ + | tee /etc/apt/sources.list.d/flashmq.list \ + && apt update -y \ + && apt download -y flashmq \ + && dpkg -c flashmq_*.deb \ + && dpkg -x flashmq_*.deb flashmq \ + && mv flashmq/usr/bin/flashmq /usr/bin/ \ + && flashmq --version \ + && apt remove -y curl gpg \ + && rm -rf /var/lib/apt/lists/* flashmq_*.deb flashmq + +EXPOSE 1883 + +ENTRYPOINT ["flashmq"] +CMD ["--config-file", "/etc/flashmq/flashmq.conf"] diff --git a/flashmq/README.md b/flashmq/README.md new file mode 100644 index 0000000..dee766e --- /dev/null +++ b/flashmq/README.md @@ -0,0 +1,7 @@ +flashmq +======= + +[FlashMQ][1] is a multi-threaded fast lightweight MQTT broker. It’s written in C++, +using mostly POSIX (Linux) APIs, as an event-driven multi-core state machine. + +[1]: https://www.flashmq.org/ diff --git a/flashmq/data/etc/flashmq.conf b/flashmq/data/etc/flashmq.conf new file mode 100644 index 0000000..af5f13a --- /dev/null +++ b/flashmq/data/etc/flashmq.conf @@ -0,0 +1,4 @@ +# https://www.flashmq.org/documentation/config-file/ + +log_file /var/log/flashmq/flashmq.log +storage_dir /var/lib/flashmq diff --git a/flashmq/docker-compose.yml b/flashmq/docker-compose.yml new file mode 100644 index 0000000..162679b --- /dev/null +++ b/flashmq/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.8" +services: + flashmq: + image: vimagick/flashmq + ports: + - "1883:1883" + volumes: + - ./data/etc:/etc/flashmq + - ./data/log:/var/log/flashmq + - ./data/var:/var/lib/flashmq + restart: unless-stopped