kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Fix docker app files paths
rodzic
a3a5ca78bf
commit
33985dbd9d
15
Dockerfile
15
Dockerfile
|
@ -2,28 +2,27 @@ FROM python:3.8-slim
|
||||||
COPY requirements.txt /tmp/requirements.txt
|
COPY requirements.txt /tmp/requirements.txt
|
||||||
RUN pip3 install -r /tmp/requirements.txt
|
RUN pip3 install -r /tmp/requirements.txt
|
||||||
|
|
||||||
|
|
||||||
|
RUN [ ! -d "/app" ] && mkdir /app
|
||||||
|
RUN [ ! -d "/datastore" ] && mkdir /datastore
|
||||||
|
|
||||||
# The actual flask app
|
# The actual flask app
|
||||||
COPY backend /app
|
COPY backend /app/backend
|
||||||
|
|
||||||
# The eventlet server wrapper
|
# The eventlet server wrapper
|
||||||
COPY backend.py /app/backend.py
|
COPY changedetection.py /app/changedetection.py
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops
|
# https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
# Attempt to store the triggered commit
|
# Attempt to store the triggered commit
|
||||||
|
|
||||||
ARG SOURCE_COMMIT
|
ARG SOURCE_COMMIT
|
||||||
ARG SOURCE_BRANCH
|
ARG SOURCE_BRANCH
|
||||||
RUN echo "commit: $SOURCE_COMMIT branch: $SOURCE_BRANCH" >/source.txt
|
RUN echo "commit: $SOURCE_COMMIT branch: $SOURCE_BRANCH" >/source.txt
|
||||||
|
|
||||||
|
CMD [ "python", "./changedetection.py" , "-d", "/datastore"]
|
||||||
RUN [ ! -d "/datastore" ] && mkdir /datastore
|
|
||||||
|
|
||||||
CMD [ "python", "./backend.py" , "-d", "/datastore"]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ ENV PYTHONUNBUFFERED=1
|
||||||
# Should be mounted from docker-compose-development.yml
|
# Should be mounted from docker-compose-development.yml
|
||||||
RUN pip3 install -r /requirements.txt
|
RUN pip3 install -r /requirements.txt
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
RUN [ ! -d "/datastore" ] && mkdir /datastore
|
RUN [ ! -d "/datastore" ] && mkdir /datastore
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue