dockerization

This commit is contained in:
2019-09-05 08:16:37 +02:00
parent 2265e5fd7f
commit 14dfa67907
3 changed files with 16 additions and 11 deletions

7
Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM python:3.7
ENV DB_FILE=checks.json
WORKDIR /app
COPY requirements.txt .
RUN python -m pip install -r requirements.txt
COPY check.py .
CMD ["python", "./check.py"]

View File

@@ -4,20 +4,11 @@ import hashlib
import time
import datetime
import tinydb
import os
pushover.init('abz8is31hd3m2e36g62w4msihj87cr')
db = tinydb.TinyDB('checks.json')
Entry = tinydb.Query()
#db.insert({
# 'url': 'https://www.europapark.de/de/uebernachten/alle-angebote/sommersaison/europa-rundreise',
# 'hash':''
#})
#db.insert({
# 'url': 'https://www.europapark.de/de/uebernachten/alle-angebote/sommerangebote',
# 'hash':''
#})
db = tinydb.TinyDB(os.getenv('DB_FILE',default='checks.json'))
while True:
entries = db.all()

7
requirements.txt Normal file
View File

@@ -0,0 +1,7 @@
certifi==2019.6.16
chardet==3.0.4
idna==2.8
python-pushover==0.4
requests==2.22.0
tinydb==3.13.0
urllib3==1.25.3