Browse Source

working prototype

main v0.3.0
Tamás Gérczei 1 week ago
commit
600c2c3c64
Signed by: tgerczei GPG Key ID: 5B59A7760597B1A1
2 changed files with 49 additions and 0 deletions
  1. +41
    -0
      Containerfile
  2. +8
    -0
      README.md

+ 41
- 0
Containerfile View File

@ -0,0 +1,41 @@
FROM python:3.7-alpine AS builder
RUN apk --update --no-cache add build-base && \
python -m pip install --cache-dir=/tmp/ \
click==7.1.2 \
CoAPthon3==1.0.1 \
Flask==1.1.2 \
itsdangerous==1.1.0 \
Jinja2==2.11.2 \
MarkupSafe==1.1.1 \
prometheus-client==0.9.0 \
py-air-control==2.2.0 \
py-air-control-exporter==0.3.0 \
pycryptodomex==3.9.9 \
Werkzeug==1.0.1 && \
mkdir /wheels/ && \
find /tmp/wheels -type f -name '*.whl' | xargs -I{} cp -v {} /wheels/
FROM python:3.7-alpine
COPY --from=builder /wheels /packages
RUN python -m pip install --no-cache-dir --no-index --find-links=packages/ \
CoAPthon3==1.0.1 \
MarkupSafe==1.1.1 \
pycryptodomex==3.9.9 && \
python -m pip install --no-cache-dir \
click==7.1.2 \
Werkzeug==1.0.1 \
Jinja2==2.11.2 \
Flask==1.1.2 \
itsdangerous==1.1.0 \
py-air-control==2.2.0 \
py-air-control-exporter==0.3.0 && \
rm -rf /packages && \
adduser -s /bin/false -S -D python
EXPOSE 9896
USER python
WORKDIR /home/python
ENTRYPOINT ["py-air-control-exporter"]
CMD ["--host", "0.0.0.0"]

+ 8
- 0
README.md View File

@ -0,0 +1,8 @@
# contain-air
## What?
Exports Prometheus metrics from Philips smart air purifiers ("i" series).
## How?
Using the GitHub project [urbas/py-air-control-exporter](https://github.com/urbas/py-air-control-exporter).
### Usage example
docker run -d --log-driver none -P --name air-purifier-monitoring --memory=50m --restart on-failure tgerczei/py-air-control-exporter --host ip.address.of.purifier --protocol coap

Loading…
Cancel
Save