diff --git a/API.md b/API.md
index 149ce84..344c003 100644
--- a/API.md
+++ b/API.md
@@ -261,6 +261,7 @@ const ploneOptions: PloneOptions = { ... }
| backend
| PloneBaseOptions
| *No description.* |
| frontend
| PloneBaseOptions
| *No description.* |
| imagePullSecrets
| string[]
| *No description.* |
+| siteId
| string
| *No description.* |
| version
| string
| *No description.* |
---
@@ -295,6 +296,16 @@ public readonly imagePullSecrets: string[];
---
+##### `siteId`Optional
+
+```typescript
+public readonly siteId: string;
+```
+
+- *Type:* string
+
+---
+
##### `version`Optional
```typescript
diff --git a/src/plone.ts b/src/plone.ts
index 97db3ee..6806333 100644
--- a/src/plone.ts
+++ b/src/plone.ts
@@ -17,6 +17,7 @@ export interface PloneBaseOptions {
}
export interface PloneOptions {
readonly version?: string;
+ readonly siteId?: string;
readonly backend?: PloneBaseOptions;
readonly frontend?: PloneBaseOptions;
readonly imagePullSecrets?: string[];
@@ -30,6 +31,10 @@ export class Plone extends Construct {
constructor(scope: Construct, id: string, options: PloneOptions = {}) {
super(scope, id);
+ // ------------------------------------------------------------------------
+ // General
+ const siteId = options.siteId ?? 'Plone';
+
// ------------------------------------------------------------------------
// Backend
const backend = options.backend ?? {};
@@ -134,7 +139,7 @@ export class Plone extends Construct {
var frontendEnvironment = frontend.environment ?? new kplus.Env([], {});
if (frontendEnvironment.variables.RAZZLE_INTERNAL_API_PATH === undefined) {
// connect with backend service
- frontendEnvironment?.addVariable('RAZZLE_INTERNAL_API_PATH', kplus.EnvValue.fromValue(`http://${backendService.name}:${backendPort}`));
+ frontendEnvironment?.addVariable('RAZZLE_INTERNAL_API_PATH', kplus.EnvValue.fromValue(`http://${backendService.name}:${backendPort}/${siteId}`));
}
// Deployment
diff --git a/test/__snapshots__/plone.test.ts.snap b/test/__snapshots__/plone.test.ts.snap
index 6b6de6a..f922c08 100644
--- a/test/__snapshots__/plone.test.ts.snap
+++ b/test/__snapshots__/plone.test.ts.snap
@@ -151,7 +151,7 @@ exports[`defaults 1`] = `
"env": [
{
"name": "RAZZLE_INTERNAL_API_PATH",
- "value": "http://app-plone-backend-service-c8efef4c:8080",
+ "value": "http://app-plone-backend-service-c8efef4c:8080/Plone",
},
],
"envFrom": [],
@@ -391,7 +391,7 @@ exports[`defaults-with-pdps 1`] = `
"env": [
{
"name": "RAZZLE_INTERNAL_API_PATH",
- "value": "http://app-plone_with_pdbs-backend-service-c819541f:8080",
+ "value": "http://app-plone_with_pdbs-backend-service-c819541f:8080/Plone",
},
],
"envFrom": [],