make deployment container-ready
This commit is contained in:
parent
56fa4ab05f
commit
cd79d3c852
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue