-
Notifications
You must be signed in to change notification settings - Fork 0
/
standalone.config.js
94 lines (86 loc) · 2.16 KB
/
standalone.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
const path = require('path');
const { getExposedPort } = require('./helpers');
const env = 'ci-beta';
const port = 4000;
// Entitlements-config has master (which is ci), prod, qa
function getEntitlementsBranch(env) {
if (env.startsWith('prod')) {
return 'prod';
}
else if (env.startsWith('qa')) {
return 'qa';
}
return 'master';
}
const backend = {
chrome: {
keycloak: {
args: [
`-p 4001:8080`,
"-e KEYCLOAK_USER=admin",
"-e KEYCLOAK_PASSWORD=admin",
"-e DB_VENDOR=h2",
`-v ${path.join(__dirname, 'keycloak/realm_export.json')}:/tmp/realm_export.json`,
"jboss/keycloak",
"-Dkeycloak.migration.action=import",
"-Dkeycloak.migration.provider=singleFile",
"-Dkeycloak.migration.file=/tmp/realm_export.json",
"-Dkeycloak.migration.strategy=OVERWRITE_EXISTING",
]
},
register: './api/registerChrome'
},
entitlements: ({ env }) => ({
assets: {
'entitlements-config': `https://github.com/redhatinsights/entitlements-config#${getEntitlementsBranch(env)}`
},
register: './api/registerEntitlements',
context: '/api/entitlements/v1',
}),
};
const frontend = {
chrome: {
path: 'https://github.com/redhatinsights/insights-chrome-build',
context: [
'/apps/chrome',
],
keycloakUri: `http://localhost:${getExposedPort(backend.chrome.keycloak.args)}`
},
landing: {
path: 'https://github.com/redhatinsights/landing-page-frontend-build',
context: [
'/apps/landing',
'/index.html',
'/maintenance.html',
'/silent-check-sso.html',
'/404.html'
],
},
config: {
path: 'https://github.com/redhatinsights/cloud-services-config',
context: [
'/config'
]
},
};
module.exports = {
env, // Determine which branches to checkout if none specified
reposDir: path.join(__dirname, 'repos'),
port,
frontend,
backend,
};
/* ideal
* const frontend = {
* chrome: {
* path: '~/src/crc/insights-chrome/build'
* }
* };
*
* const backend = {
* 'cost-management': {
* context: '/api/cost-management/v1',
* target: 'https://ci.cloud.redhat.com'
* },
* };
*/