dockerization
This commit is contained in:
7
Dockerfile
Normal file
7
Dockerfile
Normal 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"]
|
||||
13
check.py
13
check.py
@@ -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
7
requirements.txt
Normal 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
|
||||
Reference in New Issue
Block a user