Browse Source

added json_get to Dockerfile

Spencer Gardner 6 years ago
parent
commit
0b3120d026
1 changed files with 20 additions and 1 deletions
  1. 20 1
      Dockerfile

+ 20 - 1
Dockerfile

@@ -23,8 +23,27 @@ ENV GOBIN /go/bin
 RUN go get
 RUN go install
 
+WORKDIR /go/src/git.snppla.net/snppla/json_get/
+RUN go get
+RUN go install
+
+#############################
+from debian as json_get
+
+COPY --from=build-log /go/bin/json_get /usr/bin
+
+ENV DB temperature
+ENV USER ""
+ENV PASSWORD ""
+ENV HOST http://localhost:80
+ENV DB_HOST http://localhost:8086
+ENV LOCATION "unknown"
+ENV DELAY 60
+
+CMD json_get -db $DB -host $HOST -dbHost $DB_HOST -location $LOCATION -password $PASSWORD -user $USER -delay $DELAY
+
 ##############################
-from debian as main
+from debian as log_temperature
 RUN apt-get update && apt-get upgrade -y 
 RUN apt-get install -y librtlsdr0 && apt-get clean
 COPY --from=build-rtl_433 /rtl_433/install/bin/rtl_433 /usr/bin