include healthcheck in default actions

This commit is contained in:
David Nedved
2020-04-01 11:42:35 +10:00
parent a30d4019fd
commit b8e9d8ad33
6 changed files with 74 additions and 7 deletions
+25
View File
@@ -0,0 +1,25 @@
FROM debian:stretch
RUN apt update && apt install -y \
curl \
git \
build-essential \
cmake \
jq \
mosquitto-clients
ADD sources/ /opt/
ADD config/ /etc/inverter/
RUN cd /opt/inverter-cli && \
mkdir bin && cmake . && make && mv inverter_poller bin/
HEALTHCHECK \
--interval=30s \
--timeout=10s \
--start-period=1m \
--retries=3 \
CMD /opt/healthcheck
WORKDIR /opt
ENTRYPOINT ["/bin/bash", "/opt/inverter-mqtt/entrypoint.sh"]