make deployment container-ready

This commit is contained in:
Joerg Lehmann 2022-07-05 18:15:04 +02:00
parent 56fa4ab05f
commit cd79d3c852
1 changed files with 2 additions and 2 deletions

View File

@ -274,7 +274,7 @@ func downloadmetricsHandler(response http.ResponseWriter, request *http.Request)
mystart = start[0] 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") data := []byte(fmt.Sprintf(`from(bucket:"wobischbucket")
|> range(start: %s, stop: %s) |> range(start: %s, stop: %s)
|> filter(fn: (r) => r._measurement == "measurement") |> filter(fn: (r) => r._measurement == "measurement")
@ -410,7 +410,7 @@ func CalcDaysUntil(mydate string) int {
func getLastMetrics(deveui string) OneMetric { func getLastMetrics(deveui string) OneMetric {
var res 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") data := []byte(fmt.Sprintf(`from(bucket:"wobischbucket")
|> range(start:-365d) |> range(start:-365d)