make deployment container-ready

This commit is contained in:
2022-07-05 18:15:04 +02:00
parent 56fa4ab05f
commit cd79d3c852
+2 -2
View File
@@ -274,7 +274,7 @@ func downloadmetricsHandler(response http.ResponseWriter, request *http.Request)
mystart = start[0]
}
url := "http://localhost:8086/api/v2/query?org=wobischorg"
url := getenv("INFLUX_URL", "http://localhost:8086/api/v2/query?org=wobischorg")
data := []byte(fmt.Sprintf(`from(bucket:"wobischbucket")
|> range(start: %s, stop: %s)
|> filter(fn: (r) => r._measurement == "measurement")
@@ -410,7 +410,7 @@ func CalcDaysUntil(mydate string) int {
func getLastMetrics(deveui string) OneMetric {
var res OneMetric
url := "http://localhost:8086/api/v2/query?org=wobischorg"
url := getenv("INFLUX_URL", "http://localhost:8086/api/v2/query?org=wobischorg")
data := []byte(fmt.Sprintf(`from(bucket:"wobischbucket")
|> range(start:-365d)