@envsync-cloud/deploy-cli 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +22 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -257,8 +257,15 @@ function renderKeycloakRealm(config) {
|
|
|
257
257
|
secret: webSecret,
|
|
258
258
|
standardFlowEnabled: true,
|
|
259
259
|
directAccessGrantsEnabled: false,
|
|
260
|
-
redirectUris: [
|
|
260
|
+
redirectUris: [
|
|
261
|
+
`https://${hosts.api}/api/access/web/callback`,
|
|
262
|
+
`https://${hosts.app}/auth/callback`,
|
|
263
|
+
`https://${hosts.app}`
|
|
264
|
+
],
|
|
261
265
|
webOrigins: [`https://${hosts.app}`],
|
|
266
|
+
attributes: {
|
|
267
|
+
"post.logout.redirect.uris": "+"
|
|
268
|
+
},
|
|
262
269
|
defaultClientScopes: ["basic", "web-origins", "profile", "email", "roles"]
|
|
263
270
|
},
|
|
264
271
|
{
|
|
@@ -363,6 +370,18 @@ function renderNginxConf(kind) {
|
|
|
363
370
|
"}"
|
|
364
371
|
].join("\n") + "\n";
|
|
365
372
|
}
|
|
373
|
+
function renderFrontendRuntimeConfig(config) {
|
|
374
|
+
const hosts = domainMap(config.domain.root_domain);
|
|
375
|
+
return `window.__ENVSYNC_RUNTIME_CONFIG__ = ${JSON.stringify({
|
|
376
|
+
apiBaseUrl: `https://${hosts.api}`,
|
|
377
|
+
appBaseUrl: `https://${hosts.app}`,
|
|
378
|
+
authBaseUrl: `https://${hosts.auth}`,
|
|
379
|
+
keycloakRealm: config.auth.keycloak_realm,
|
|
380
|
+
webClientId: config.auth.web_client_id,
|
|
381
|
+
apiDocsUrl: `https://${hosts.api}/docs`
|
|
382
|
+
}, null, 2)};
|
|
383
|
+
`;
|
|
384
|
+
}
|
|
366
385
|
function renderOtelAgentConfig(config) {
|
|
367
386
|
return [
|
|
368
387
|
"receivers:",
|
|
@@ -735,6 +754,8 @@ async function cmdDeploy() {
|
|
|
735
754
|
ensureDir(`${RELEASES_ROOT}/landing/current`);
|
|
736
755
|
extractStaticBundle(config.images.web, `${RELEASES_ROOT}/web/current`);
|
|
737
756
|
extractStaticBundle(config.images.landing, `${RELEASES_ROOT}/landing/current`);
|
|
757
|
+
writeFile(`${RELEASES_ROOT}/web/current/runtime-config.js`, renderFrontendRuntimeConfig(config));
|
|
758
|
+
writeFile(`${RELEASES_ROOT}/landing/current/runtime-config.js`, renderFrontendRuntimeConfig(config));
|
|
738
759
|
run("docker", ["stack", "deploy", "-c", STACK_FILE, config.services.stack_name]);
|
|
739
760
|
}
|
|
740
761
|
async function cmdHealth(asJson) {
|