diff --git a/docker/Dockerfile b/docker/Dockerfile index b0e3bf0..d12ca06 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/node:11.12-alpine +FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/node:14-alpine LABEL source_repository="https://github.com/sapcc/supernova" diff --git a/docker/Dockerfile.test b/docker/Dockerfile.test index 088d793..53d5169 100644 --- a/docker/Dockerfile.test +++ b/docker/Dockerfile.test @@ -1,14 +1,14 @@ -FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/node:11.12-alpine +FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/node:14-alpine LABEL source_repository="https://github.com/sapcc/supernova" RUN apk --no-cache add git ca-certificates bash make nano sudo RUN apk update && apk upgrade && \ - echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \ - echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \ - apk add --no-cache \ - chromium@edge \ - nss@edge + echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \ + echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \ + apk add --no-cache \ + chromium@edge \ + nss@edge # Tell Puppeteer to skip installing Chrome. We'll be using the installed package. ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true diff --git a/server/lib/AlertManagerApi.js b/server/lib/AlertManagerApi.js index 87d78e1..23c4c1b 100644 --- a/server/lib/AlertManagerApi.js +++ b/server/lib/AlertManagerApi.js @@ -14,13 +14,19 @@ let activeIndex = 0 let activeUrl = endpoints[activeIndex] const url = (path) => `${activeUrl}/${path}` -const userCert = fs.readFileSync( - process.env.PROMETHEUS_USER_CERT_LOCATION || - path.join(certFilePath, "sso.crt") -) -const userKey = fs.readFileSync( - process.env.PROMETHEUS_USER_KEY_LOCATION || path.join(certFilePath, "sso.key") -) +let userCert, userKey +try { + userCert = fs.readFileSync( + process.env.PROMETHEUS_USER_CERT_LOCATION || + path.join(certFilePath, "sso.crt") + ) + userKey = fs.readFileSync( + process.env.PROMETHEUS_USER_KEY_LOCATION || + path.join(certFilePath, "sso.key") + ) +} catch (e) { + console.error(e) +} const alerts = async (params = {}) => axios