updated docker

This commit is contained in:
2019-09-05 17:32:51 +02:00
parent fe4068c2aa
commit 504578cf88
2 changed files with 7 additions and 4 deletions

View File

@@ -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"]

View File

@@ -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):