-
Notifications
You must be signed in to change notification settings - Fork 28
/
Dockerfile
55 lines (42 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM python:alpine
ARG VERSION
ARG BUILD_DATE
ARG VCS_REF
LABEL maintainer="dkruyt" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.url="https://github.com/dkruyt/ginlong-solis-scraper" \
org.opencontainers.image.source="https://github.com/dkruyt/ginlong-solis-scraper" \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.vendor="dkruyt" \
org.opencontainers.image.title="ginlong-solis-scraper" \
org.opencontainers.image.description="Scrapes PV statistics from the Ginlong monitor pages and outputs it to influxdb, pvoutput or mqtt" \
org.opencontainers.image.licenses="GPL-3.0"
ENV LOG_LEVEL="INFO"
ENV GINLONG_USERNAME=""
ENV GINLONG_PASSWORD=""
ENV GINLONG_DOMAIN="m.ginlong.com"
ENV GINLONG_LANG="2"
ENV GINLONG_DEVICE_ID=""
ENV USE_INFLUX="false"
ENV INFLUX_DATABASE="influxdb"
ENV INFLUX_SERVER="localhost"
ENV INFLUX_PORT="8086"
ENV INFLUX_PASSWORD=""
ENV INFLUX_USER=""
ENV INFLUX_MEASUREMENT="PV"
ENV USE_PVOUTPUT="false"
ENV PVOUTPUT_API_KEY=""
ENV PVOUTPUT_SYSTEM_ID=""
ENV USE_MQTT="false"
ENV MQTT_CLIENT_ID="pv"
ENV MQTT_SERVER="localhost"
ENV MQTT_USERNAME=""
ENV MQTT_PASSWORD=""
ENV TZ=""
RUN apk add -U tzdata
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY ginlong-scraper.py ./
CMD [ "python", "./ginlong-scraper.py" ]