diff --git a/README.md b/README.md new file mode 100644 index 00000000..eaacf70c --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# changedetection.io + +Self-hosted change monitoring of web pages. + +_Why?_ Many years ago I had used a couple of web site change detection/monitoring services, +but they got bought up by larger media companies, after this, whenI logged in they +wanted _even more_ private data about me. + +All I simply wanted todo was to know which pages were changing and when (and maybe see +some basic information about what those changes were) + +``` +git clone https://github.com/dgtlmoon/changedetection.io.git +cd changedetection.io +docker-compose up -d + +``` + +Now visit http://127.0.0.1:5000 , The interface will now expose the UI, you can change this in the `docker-compose.yml` + diff --git a/backend/dev-docker/build.sh b/backend/dev-docker/build.sh deleted file mode 100755 index 87d79168..00000000 --- a/backend/dev-docker/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -docker stop tss-node -docker rm tss-node -docker build -t tss-node . - diff --git a/backend/dev-docker/requirements.txt b/backend/dev-docker/requirements.txt index 29c217b4..ee29a712 100644 --- a/backend/dev-docker/requirements.txt +++ b/backend/dev-docker/requirements.txt @@ -1,18 +1,20 @@ -aiohttp==1.3.1 -async-timeout==1.1.0 +aiohttp +async-timeout chardet==2.3.0 -multidict==2.1.4 +multidict python-engineio -python_socketio==1.8.4 six==1.10.0 -yarl==0.9.2 -eventlet==0.19.0 +yarl flask -# Actual connecting to services -pytz -phpserialize==1.3.0 -redis>=2.6.2 -pymysql==0.8 -bleach==1.5.0 +eventlet +requests +validators + +bleach==3.2.1 html5lib==0.9999999 # via bleach +timeago +html2text + +# @notes +# - Dont install socketio, it interferes with flask_socketio diff --git a/backend/fetch_site_status.py b/backend/fetch_site_status.py index aee15fbe..561d34ae 100644 --- a/backend/fetch_site_status.py +++ b/backend/fetch_site_status.py @@ -60,7 +60,7 @@ class perform_site_check(Thread): try: r = requests.get(self.url, headers=headers, timeout=15, verify=False) stripped_text_from_html = html2text.html2text(r.content.decode('utf-8')) - self.save_response_stripped_output(stripped_text_from_html) + # Usually from networkIO/requests level except (requests.exceptions.ConnectionError,requests.exceptions.ReadTimeout) as e: @@ -90,6 +90,7 @@ class perform_site_check(Thread): self.datastore.update_watch(self.uuid, 'previous_md5', fetched_md5) self.save_response_html_output(r.text) + self.save_response_stripped_output(stripped_text_from_html) self.datastore.update_watch(self.uuid, 'last_checked', int(time.time())) diff --git a/backend/production-docker/Dockerfile b/backend/production-docker/Dockerfile new file mode 100644 index 00000000..43608d61 --- /dev/null +++ b/backend/production-docker/Dockerfile @@ -0,0 +1,9 @@ +FROM python:3.8-buster +COPY requirements.txt /tmp/requirements.txt +RUN pip3 install -r /tmp/requirements.txt + +# So that it can find the certs +WORKDIR /app + +CMD [ "python", "/app/backend.py" ] + diff --git a/backend/production-docker/requirements.txt b/backend/production-docker/requirements.txt new file mode 100644 index 00000000..ee29a712 --- /dev/null +++ b/backend/production-docker/requirements.txt @@ -0,0 +1,20 @@ +aiohttp +async-timeout +chardet==2.3.0 +multidict +python-engineio +six==1.10.0 +yarl +flask + +eventlet +requests +validators + +bleach==3.2.1 +html5lib==0.9999999 # via bleach +timeago +html2text + +# @notes +# - Dont install socketio, it interferes with flask_socketio diff --git a/docker-compose-development.yml b/docker-compose-development.yml index 911a1bed..ca4a0783 100644 --- a/docker-compose-development.yml +++ b/docker-compose-development.yml @@ -3,7 +3,7 @@ services: backend: build: ./backend/dev-docker - container_name: changedection-backend + container_name: changedetection.io-dev volumes: - ./backend:/app - ./datastore:/datastore diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..65b2d86e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: "2" +services: + + backend: + build: ./backend/production-docker + container_name: changedetection.io + volumes: + - ./backend:/app + - ./datastore:/datastore + + ports: + - "127.0.0.1:5000:5000" + + networks: + - changenet + + restart: always + +networks: + changenet: