new file: requirements.txt

modified:   src/Dockerfile
	modified:   src/config.yaml
	modified:   src/run.sh
This commit is contained in:
TC
2023-12-21 23:09:48 +01:00
parent 1df87e8108
commit 7f4042f3ac
5 changed files with 22 additions and 13 deletions

View File

@@ -2,18 +2,23 @@ ARG BUILD_FROM
FROM $BUILD_FROM
RUN apk add --no-cache python3
RUN apk add --update py3-pip
WORKDIR /app
COPY requirements.txt .
# Copy data for add-on
COPY run.sh /
COPY run.py /
COPY requirements.txt /
COPY main.py /
COPY api.py /
COPY moj_licznik.py /
COPY log_config.py /
COPY database_empty.sqlite /database.sqlite
RUN chmod a+x /run.sh
RUN pip install -r requirements.txt
COPY run.sh .
COPY run.py .
COPY main.py .
COPY api.py .
COPY moj_licznik.py .
COPY log_config.py .
COPY database_empty.sqlite database.sqlite
RUN chmod a+x run.sh
CMD [ "/run.sh" ]
RUN apk add --update --no-cache py3-pip && \
python3 -m venv /app/venv && \
source /app/venv/bin/activate && \
pip install -r requirements.txt
CMD [ "/app/run.sh" ]