addci script

This commit is contained in:
Wolfgang Hottgenroth 2022-11-22 21:26:57 +01:00
parent a82b7f6247
commit 1e4aadd602
Signed by: wn
GPG Key ID: 836E9E1192A6B132
3 changed files with 38 additions and 0 deletions

5
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,5 @@
include:
- project: dockerized/commons
ref: master
file: gitlab-ci-template.yml

33
Dockerfile Normal file
View File

@ -0,0 +1,33 @@
FROM python:latest
LABEL Maintainer="Wolfgang Hottgenroth wolfgang.hottgenroth@icloud.com"
LABEL ImageName="registry.hottis.de/dockerized/pv-controller"
ARG APP_DIR="/opt/app"
ARG CONF_DIR="${APP_DIR}/config"
RUN \
apt update && \
pip3 install loguru && \
pip3 install pymodbus && \
pip3 install paho-mqtt
RUN \
mkdir -p ${APP_DIR} && \
mkdir -p ${CONF_DIR} && \
useradd -d ${APP_DIR} -u 1000 user
COPY src/*.py ${APP_DIR}/
COPY config.ini ${CONF_DIR}/
USER 1000:1000
WORKDIR ${APP_DIR}
VOLUME ${CONF_DIR}
CMD [ "python", "pvc.py" ]

Binary file not shown.