> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# テスト環境でのデプロイ

> このページは先行公開版です。内容は今後予告なく更新される可能性があります。

## 要件

以下は、**テスト環境**または**ステージング環境**での推奨構成です。必要に応じて調整することができます。

* **Kubernetes クラスター**

  * ワーカーノード 1 台：4 CPU、16 GB RAM
* **コンテナレジストリ**

  * AWS ECR（with AK/SK or IRSA）/ Azure ACR / Aliyun ACR (with AK/SK) / Tencent TCR (with AK/SK) / Dockerhub / Google Artifact Registry
* **永続ストレージ**

  * S3 / AWS S3 (with AK/SK or IRSA) / Azure Blob / Aliyun OSS (with AK/SK) / Tencent COS (with AK/SK) / Google GCS
  * 100 GB ストレージ
* **PostgreSQL データベース**

  * バージョン 14 以上
  * 4 CPU、8 GB RAM
  * 512 GB 以上の SSD
* **Redis データベース**

  * バージョン 6 以上
  * 1 GB RAM
* **[ベクトルDB 仮想マシン - Qdrant シングルノード](/versions/3-0-x/ja-jp/deployment/advanced-configuration/qdrant/single-node)**

  * 仮想マシン 1 台
  * 4 CPU、8 GB RAM
  * 100 GB ストレージ

## デプロイ手順

### 1. Helm リポジトリ情報の取得

```bash theme={null}
helm repo add dify https://langgenius.github.io/dify-helm
helm repo update
```

詳細は [Dify Helm Chart](/versions/3-0-x/ja-jp/deployment/advanced-configuration/dify-helm-chart) をご参照ください。

### 2. Helm の値ファイルを保存

* `values.yaml` という名前で Helm の値ファイルを保存してください。
* ご自身の設定にあわせて `values.yaml` を編集してください。

<Warning>
  - `#REPLACE_ME#` は必ず実際の値に置き換えてください。
  - `"dify123456"` を独自の値に変更してください。
  - `global.appSecretKey` と `enterprise.appSecretKey` は異なる値にしてください。
</Warning>

```yaml theme={null}
###################################
# Please replace "dify123456" with your own value
###################################
global:
  appSecretKey: 'dify123456'
  consoleApiDomain: "console.dify.local"
  consoleWebDomain: "console.dify.local"
  serviceApiDomain: "api.dify.local"
  appApiDomain: "app.dify.local"
  appWebDomain: "app.dify.local"
  filesDomain: "upload.dify.local"
  enterpriseDomain: "enterprise.dify.local"

ingress:
  enabled: true
  className: "nginx"
  annotations: {
    # set file upload size limit
    nginx.ingress.kubernetes.io/proxy-body-size: "15m"
  }

api:
  replicas: 3
  serverWorkerAmount: 1
  innerApi:
    apiKey: "dify123456"
worker:
  replicas: 3
  celeryWorkerAmount: 1
web:
  replicas: 1
sandbox:
  replicas: 1
  apiKey: "dify123456"
enterpriseAudit:
  replicas: 1
enterprise:
  replicas: 1
  appSecretKey: "dify123456"
  adminAPIsSecretKeySalt: "dify123456"
  innerApi:
    apiKey: "dify123456"
enterpriseFrontend:
  replicas: 1
ssrfProxy:
  enabled: true
  replicas: 1
unstructured:
  enabled: true
  replicas: 1
plugin_daemon:
  replicas: 1
  apiKey: "dify123456"
plugin_controller:
  replicas: 1
plugin_connector:
  replicas: 1
  apiKey: "dify123456"
gateway:
  replicas: 1

###################################
# Persistence Configration
###################################
persistence:
  type: "s3"
  s3:
    endpoint: "https://xxx.r2.cloudflarestorage.com"
    accessKey: "#REPLACE_ME#"
    secretKey: "#REPLACE_ME#"
    region: "us-east-1"
    bucketName: "your-bucket-name"
    addressType: ""
    useAwsManagedIam: false
    useAwsS3: true

###################################
# External postgres
###################################
externalPostgres:
  enabled: true
  address: "#REPLACE_ME#"
  port: 5432
  credentials:
    dify:
      database: "dify"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    plugin_daemon:
      database: "dify_plugin_daemon"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    enterprise:
      database: "enterprise"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    audit:
      database: "audit"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"

###################################
# External Redis
###################################
externalRedis:
  enabled: true
  host: "#REPLACE_ME#"
  port: 6379
  username: ""
  password: "#REPLACE_ME#"
  useSSL: false

###################################
# External Qdrant
###################################
vectorDB:
  useExternal: true
  externalType: "qdrant"
  externalQdrant:
    endpoint: "http://your-qdrant-cluster-url.qdrant.tech/"
    apiKey: "#REPLACE_ME#"

imagePullSecrets: []
```

### 3. `コンテナレジストリ` の設定

* 3.1 プラグイン用コンテナレジストリ：
  詳細は [Container Registry for Plugins](/versions/3-0-x/ja-jp/deployment/advanced-configuration/container-registry-for-plugins) を参照してください。
* 3.2 サービス用コンテナレジストリ：
  詳細は [Container Registry](/versions/3-0-x/ja-jp/deployment/advanced-configuration/container-registry) を参照してください。

### 4. `永続ストレージ` の設定

* 詳細は [永続ストレージ設定ガイド](/versions/3-0-x/ja-jp/deployment/advanced-configuration/persistent-storage) を参照してください。

### 5. `外部 PostgreSQL` の設定

* 詳細は [外部 PostgreSQL の設定ガイド](/versions/3-0-x/ja-jp/deployment/advanced-configuration/postgresql-database) を参照してください。

### 6. `外部 Redis` の設定

* 詳細は [外部 Redis の設定ガイド](/versions/3-0-x/ja-jp/deployment/advanced-configuration/redis) を参照してください。

### 7. `外部 Qdrant` の設定

* 詳細は [外部 Qdrant（シングルノード）](/versions/3-0-x/ja-jp/deployment/advanced-configuration/qdrant/single-node) を参照してください。

### 8. `Ingress Controller` の設定

* 詳細は [Ingress Controller の設定ガイド](/versions/3-0-x/ja-jp/deployment/advanced-configuration/nginx-ingress-controller) を参照してください。

### 9. Dify Helm Chart のインストール

```bash theme={null}
helm upgrade -i dify -f values.yaml dify/dify
```

### 10. インストールの確認

* 詳細は [サービスステータスの確認](/versions/3-0-x/ja-jp/deployment/verify-services-status) を参照してください。

## 高度な設定

### 1. ドメインと SSL 証明書

* 詳細は [ドメインと SSL 証明書の設定](/versions/3-0-x/ja-jp/deployment/advanced-configuration/domain-and-ssl-certificate) を参照してください。

### 2. メールプロバイダー

* 詳細は [メールプロバイダーの設定](/versions/3-0-x/ja-jp/deployment/advanced-configuration/email-provider) を参照してください。

### 3. パフォーマンスチューニング

* 詳細は [パフォーマンス最適化ガイド](/versions/3-0-x/ja-jp/deployment/advanced-configuration/performance) を参照してください。
