diff --git a/Dockerfile b/Dockerfile index f5bfab7..1aa907b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ FROM python:3.7 -ENV DB_FILE=checks.json +ENV DB_FILE=/data/grabbing.json +VOLUME /data +WORKDIR /data +COPY grabconfig.json ./ WORKDIR /app COPY requirements.txt . RUN python -m pip install -r requirements.txt COPY check.py . -CMD ["python", "./check.py"] +CMD ["python", "./ebgrab.py"] diff --git a/epgrab.py b/epgrab.py index 73bcd12..220f6ba 100644 --- a/epgrab.py +++ b/epgrab.py @@ -7,8 +7,8 @@ import pushover logging.basicConfig(level=logging.DEBUG) pushover.init('abz8is31hd3m2e36g62w4msihj87cr') -db = tinydb.TinyDB('grabbing.json') -with open ('grabconfig.json') as configfile: +db = tinydb.TinyDB(os.getenv('DB_FILE',default='/data/grabbing.json')) +with open (os.getenv('CONFIG_FILE',default='/data/grabconfig.json')) as configfile: config = json.load(configfile) def thash(inp: str):