From 08ff260a9290f3f40f73f65ac878854fb185416a Mon Sep 17 00:00:00 2001 From: "remote-swe-app[bot]" <123456+remote-swe-app[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:42:43 +0000 Subject: [PATCH 1/3] docs: add additionalEnvironmentVariables feature documentation to Tips section --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index 182064e..4748f47 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,47 @@ To deploy on a closed network, please follow the steps below: 6. After the deployment, please configure Bedrock in Dify with the same AWS region as your VPC (see [setup section](#setup-dify-to-use-bedrock)) * This is **only required** if Bedrock API in other regions are not accessible from your vpc subnets. +### Additional Environment Variables + +You can configure additional environment variables for Dify containers by using the `additionalEnvironmentVariables` property: + +```typescript +new DifySelfHostedOnAwsStack(app, 'DifySelfHostedOnAwsStack', { + additionalEnvironmentVariables: [ + { + key: 'NOTION_INTEGRATION_TYPE', + value: 'internal', + targets: ['api'], + }, + { + key: 'NOTION_INTERNAL_SECRET', + value: { secretName: 'NOTION_INTERNAL_SECRET'}, + targets: ['api'], + }, + { + // 環境変数を全てのコンテナに適用する例 + key: 'GLOBAL_SETTING', + value: 'value', + // targetsを省略すると全てのコンテナに適用 + }, + { + // Systems Manager パラメータを参照する例 + key: 'CONFIG_PARAM', + value: { parameterName: 'my-parameter' }, + targets: ['web', 'api'], + }, + { + // Secrets Managerの特定フィールドを参照する例 + key: 'API_KEY', + value: { secretName: 'my-secret', field: 'apiKey' }, + targets: ['worker'], + }, + ], +}); +``` + +この機能を使用することで、Difyコンテナに対してカスタム環境変数を注入できます。`targets`で指定可能なコンテナタイプは`'web'`, `'api'`, `'worker'`, `'sandbox'`です。 + ### Connect to Notion You can connect to [Notion](https://www.notion.com/) data by the following steps: From 6c5b127b98a2caac8f731acfbd99b7932551e522 Mon Sep 17 00:00:00 2001 From: "remote-swe-app[bot]" <123456+remote-swe-app[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:48:55 +0000 Subject: [PATCH 2/3] docs: change Japanese comments to English --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4748f47..f0c9965 100644 --- a/README.md +++ b/README.md @@ -200,19 +200,19 @@ new DifySelfHostedOnAwsStack(app, 'DifySelfHostedOnAwsStack', { targets: ['api'], }, { - // 環境変数を全てのコンテナに適用する例 + // Example of applying environment variable to all containers key: 'GLOBAL_SETTING', value: 'value', - // targetsを省略すると全てのコンテナに適用 + // Omitting targets applies to all containers }, { - // Systems Manager パラメータを参照する例 + // Example of referencing Systems Manager parameter key: 'CONFIG_PARAM', value: { parameterName: 'my-parameter' }, targets: ['web', 'api'], }, { - // Secrets Managerの特定フィールドを参照する例 + // Example of referencing a specific field in Secrets Manager key: 'API_KEY', value: { secretName: 'my-secret', field: 'apiKey' }, targets: ['worker'], @@ -221,7 +221,7 @@ new DifySelfHostedOnAwsStack(app, 'DifySelfHostedOnAwsStack', { }); ``` -この機能を使用することで、Difyコンテナに対してカスタム環境変数を注入できます。`targets`で指定可能なコンテナタイプは`'web'`, `'api'`, `'worker'`, `'sandbox'`です。 +This feature allows you to inject custom environment variables into Dify containers. The container types that can be specified in `targets` are `'web'`, `'api'`, `'worker'`, and `'sandbox'`. ### Connect to Notion From f38382930bf7f80af2820e1ce46fda79f9087d0f Mon Sep 17 00:00:00 2001 From: "remote-swe-app[bot]" <123456+remote-swe-app[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:51:16 +0000 Subject: [PATCH 3/3] docs: simplify additionalEnvironmentVariables examples --- README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.md b/README.md index f0c9965..8e87286 100644 --- a/README.md +++ b/README.md @@ -189,16 +189,6 @@ You can configure additional environment variables for Dify containers by using ```typescript new DifySelfHostedOnAwsStack(app, 'DifySelfHostedOnAwsStack', { additionalEnvironmentVariables: [ - { - key: 'NOTION_INTEGRATION_TYPE', - value: 'internal', - targets: ['api'], - }, - { - key: 'NOTION_INTERNAL_SECRET', - value: { secretName: 'NOTION_INTERNAL_SECRET'}, - targets: ['api'], - }, { // Example of applying environment variable to all containers key: 'GLOBAL_SETTING',