diff --git a/Dockerfile b/Dockerfile index d7e50103..4ad0953d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,28 +2,27 @@ FROM python:3.8-slim COPY requirements.txt /tmp/requirements.txt RUN pip3 install -r /tmp/requirements.txt + +RUN [ ! -d "/app" ] && mkdir /app +RUN [ ! -d "/datastore" ] && mkdir /datastore + # The actual flask app -COPY backend /app +COPY backend /app/backend # The eventlet server wrapper -COPY backend.py /app/backend.py +COPY changedetection.py /app/changedetection.py WORKDIR /app # https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops - ENV PYTHONUNBUFFERED=1 # Attempt to store the triggered commit - ARG SOURCE_COMMIT ARG SOURCE_BRANCH RUN echo "commit: $SOURCE_COMMIT branch: $SOURCE_BRANCH" >/source.txt - -RUN [ ! -d "/datastore" ] && mkdir /datastore - -CMD [ "python", "./backend.py" , "-d", "/datastore"] +CMD [ "python", "./changedetection.py" , "-d", "/datastore"] diff --git a/backend/dev-docker/Dockerfile b/backend/dev-docker/Dockerfile index c2d3871e..aa486990 100644 --- a/backend/dev-docker/Dockerfile +++ b/backend/dev-docker/Dockerfile @@ -6,6 +6,7 @@ ENV PYTHONUNBUFFERED=1 # Should be mounted from docker-compose-development.yml RUN pip3 install -r /requirements.txt +WORKDIR /app RUN [ ! -d "/datastore" ] && mkdir /datastore diff --git a/backend.py b/changedetection.py similarity index 100% rename from backend.py rename to changedetection.py