From c49f4c1992457167e6a44219a9c9fb9ea980c3fb Mon Sep 17 00:00:00 2001 From: rozetko Date: Wed, 23 May 2018 13:22:15 +0300 Subject: [PATCH] Change environment variables --- server/src/index.ts | 2 +- src/data_provider.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/index.ts b/server/src/index.ts index 3b3dcaf..16b93a1 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -7,7 +7,7 @@ import { router as alertsRouter } from './routes/alerts'; import { tgBotInit } from './services/notification'; const app = express(); -const PORT = 8000; +const PORT = process.env.HASTIC_PORT || 8000; app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); diff --git a/src/data_provider.py b/src/data_provider.py index d2764a8..d087284 100644 --- a/src/data_provider.py +++ b/src/data_provider.py @@ -136,7 +136,7 @@ class DataProvider: def __query_grafana(self, params): - headers = { 'Authorization': 'Bearer ' + os.environ['API_KEY'] } + headers = { 'Authorization': 'Bearer ' + os.environ['HASTIC_API_KEY'] } url = self.datasource['origin'] + '/' + self.datasource['url'] + '?' + urlencode(params) req = urllib.request.Request(url, headers=headers)