From bbccb3181b8bca8749726202d67b18a1eb580b59 Mon Sep 17 00:00:00 2001 From: Leigh Morresi <275001+dgtlmoon@users.noreply.github.com> Date: Fri, 29 Jan 2021 12:33:42 +0100 Subject: [PATCH] Fix build setup for the docker hub image https://hub.docker.com/r/dgtlmoon/changedetection.io --- Dockerfile | 13 +++++++++++-- README.md | 32 ++++++++++++++++++++++++++++---- docker-compose.yml | 26 -------------------------- 3 files changed, 39 insertions(+), 32 deletions(-) delete mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index a020545d..6b5a5dd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,17 @@ FROM python:3.8-slim COPY requirements.txt /tmp/requirements.txt RUN pip3 install -r /tmp/requirements.txt -# So that it can find the certs +RUN mkdir /app +COPY backend/ /app WORKDIR /app -CMD [ "python", "/app/backend.py" ] +# https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops + +ENV PYTHONUNBUFFERED=1 + +RUN [ ! -d "/datastore" ] && mkdir /datastore + +CMD [ "python", "./backend.py" ] + + diff --git a/README.md b/README.md index 335b387f..194a9641 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,39 @@ some basic information about what those changes were) ![Alt text](screenshot.png?raw=true "Screenshot") -Get going... +Get monitoring! super simple. ``` -$ git clone https://github.com/dgtlmoon/changedetection.io.git -$ cd changedetection.io -$ docker-compose up -d +$ mkdir ./datastore +$ docker run -d --restart always -p "127.0.0.1:5000:5000" -v "$(pwd)"/datastore:/datastore ``` Now visit http://127.0.0.1:5000 , The interface will now expose the UI, you can change this in the `docker-compose.yml` + + +Or in `docker-compose.yml` style. + + +```yaml +version: "2" +services: + + backend: + image: dgtlmoon/changedetection.io:latest + volumes: + - ./datastore:/datastore + ports: + - "127.0.0.1:5000:5000" + restart: always +``` + +```bash +$ mkdir datastore +$ docker-compose up -d +``` + + ### Future plans - Greater configuration of check interval times, page request headers. @@ -30,3 +53,4 @@ Now visit http://127.0.0.1:5000 , The interface will now expose the UI, you can - Use a graphic/rendered page difference instead of text (see the experimental `selenium-screenshot-diff` branch) +Please :star: star :star: this project and help it grow! https://github.com/dgtlmoon/changedetection.io/ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index decdc65c..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: "2" -services: - - backend: - build: . - image: dgtlmoon/changedetection.io:0.1 - - container_name: changedetection.io - volumes: - - ./backend:/app - - ./datastore:/datastore - -# autoreload not working :( - environment: - - FLASK_ENV=development - - PYTHONUNBUFFERED=1 #https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops - ports: - - "127.0.0.1:5000:5000" - - networks: - - changenet - - restart: always - -networks: - changenet: