forked from dkruyt/ginlong-scraper
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
49 lines (38 loc) · 1.32 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
FROM python:alpine
ARG VERSION
ARG BUILD_DATE
ARG VCS_REF
LABEL maintainer="fredericvl" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.url="https://github.com/fredericvl/ginlong-solis-scraper" \
org.opencontainers.image.source="https://github.com/fredericvl/ginlong-solis-scraper" \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.vendor="fredericvl" \
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_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=""
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" ]