add timezone
parent
90f302e39e
commit
5b596811c1
|
|
@ -2,6 +2,7 @@ version: "3"
|
||||||
services:
|
services:
|
||||||
test:
|
test:
|
||||||
build: src
|
build: src
|
||||||
|
image: docker.clkl.de/weather/snapshot:0.1
|
||||||
volumes:
|
volumes:
|
||||||
- ./src/:/app
|
- ./src/:/app
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
FROM alpine:3.8
|
FROM alpine:3.8
|
||||||
|
ENV timezone Europe/Berlin
|
||||||
ADD ["requirements.txt", "/"]
|
ADD ["requirements.txt", "/"]
|
||||||
RUN apk add --update --no-cache python3 libssl1.0 && \
|
RUN apk add --update --no-cache python3 libssl1.0 && \
|
||||||
apk add --no-cache --virtual .build-deps g++ python3-dev libffi-dev openssl-dev make && \
|
apk add --no-cache --virtual .build-deps g++ python3-dev libffi-dev openssl-dev make tzdata && \
|
||||||
|
cp /usr/share/zoneinfo/$timezone /etc/localtime && \
|
||||||
|
echo "$timezone" > /etc/timezone && \
|
||||||
pip3 install --upgrade pip && \
|
pip3 install --upgrade pip && \
|
||||||
pip3 install -r requirements.txt && \
|
pip3 install -r requirements.txt && \
|
||||||
apk del .build-deps
|
apk del .build-deps
|
||||||
|
|
@ -11,7 +11,7 @@ def setup(interval=10):
|
||||||
schedule.every(interval).minutes.do(snapshot.update)
|
schedule.every(interval).minutes.do(snapshot.update)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
interval = 1
|
interval = 10
|
||||||
sleep = (interval*60) / 10.0
|
sleep = (interval*60) / 10.0
|
||||||
setup(interval)
|
setup(interval)
|
||||||
while True:
|
while True:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue