diff --git a/README.md b/README.md index f318415..825086a 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,13 @@ $ bash scripts/run.sh $ SPANDX_CONFIG=/path/to/custom/config.js bash ~/path/to/insights-proxy/scripts/run.sh ``` +### Run the container with cloud proxy + +In order to run the container with cloud.redhat.com as main source of data you have to set `USE_CLOUD` env variable. +``` +$ USE_CLOUD=true ~/path/to/insights-proxy/scripts/run.sh +``` + ### Run with local Insights Chrome (for chrome developers only) This is for Chrome developers only. If you are developing an application on the platform you need not do this! diff --git a/package.json b/package.json index cba2ef9..83d9ba9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "insights-proxy", - "version": "3.1.9", + "version": "3.1.10", "description": "Proxy for local Insights development", "main": "index.js", "scripts": { diff --git a/spandx.config.js b/spandx.config.js index 6a609e6..0764527 100755 --- a/spandx.config.js +++ b/spandx.config.js @@ -9,6 +9,7 @@ const url = require('url-parse'); const localhost = (process.env.PLATFORM === 'linux') ? 'localhost' : 'host.docker.internal'; const protocol = (process.env.SSL === 'true') ? 'https' : 'http'; const port = process.env.PORT || 8002; +const useCloud = process.env.USE_CLOUD; const PORTAL_BACKEND_MARKER = 'PORTAL_BACKEND_MARKER'; @@ -55,22 +56,22 @@ const buildUser = input => { const envMap = { ci: { keycloakPubkey: keycloakPubkeys.qa, - target: 'https://ci.cloud.redhat.com', + target: `https://ci.${useCloud ? 'cloud' : 'console'}.redhat.com`, str: 'ci' }, qa: { keycloakPubkey: keycloakPubkeys.qa, - target: 'https://qa.cloud.redhat.com', + target: `https://qa.${useCloud ? 'cloud' : 'console'}.redhat.com`, str: 'qa' }, stage: { keycloakPubkey: keycloakPubkeys.stage, - target: 'https://cloud.stage.redhat.com', + target: `https://${useCloud ? 'cloud' : 'console'}.stage.redhat.com`, str: 'stage' }, prod: { keycloakPubkey: keycloakPubkeys.prod, - target: 'https://cloud.redhat.com', + target: `https://${useCloud ? 'cloud' : 'console'}.redhat.com`, str: 'prod' } };