mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-26 13:18:34 +07:00
feat(docs):add docs for mysql adaptation (#577)
* feat(docs):add docs for mysql adaptation * changes after review --------- Co-authored-by: Riskey <riskey47@dify.ai>
This commit is contained in:
@@ -42,7 +42,7 @@ title: Docker Compose
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### Difyのクローン
|
||||
## Difyのクローン
|
||||
|
||||
Difyのソースコードをローカルマシンにクローンします:
|
||||
|
||||
@@ -50,7 +50,7 @@ Difyのソースコードをローカルマシンにクローンします:
|
||||
git clone --branch "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r .tag_name)" https://github.com/langgenius/dify.git
|
||||
```
|
||||
|
||||
### Difyの起動
|
||||
## Difyの起動
|
||||
|
||||
1. Difyソースコード内のDockerディレクトリに移動します
|
||||
|
||||
@@ -69,7 +69,7 @@ git clone --branch "$(curl -s https://api.github.com/repos/langgenius/dify/relea
|
||||
```
|
||||
4. Dockerコンテナを起動します
|
||||
|
||||
システムのDocker Composeバージョンに基づいて、適切なコマンドを選択してコンテナを起動してください。バージョンを確認するには`$ docker compose version`コマンドを使用し、詳細については[Dockerドキュメント](https://docs.docker.com/compose/install/)を参照してください:
|
||||
システムのDocker Composeバージョンに基づいて、適切なコマンドを選択してコンテナを起動してください。バージョンを確認するには`docker compose version`コマンドを使用し、詳細については[Dockerドキュメント](https://docs.docker.com/compose/install/)を参照してください:
|
||||
|
||||
* Docker Compose V2を使用している場合は、以下のコマンドを使用します:
|
||||
|
||||
@@ -83,47 +83,51 @@ git clone --branch "$(curl -s https://api.github.com/repos/langgenius/dify/relea
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
コマンドを実行すると、すべてのコンテナのステータスとポートマッピングを示す以下のような出力が表示されるはずです:
|
||||
コマンドを実行すると、すべてのコンテナのステータスと起動時間を示す以下のような出力が表示されるはずです:
|
||||
|
||||
```bash
|
||||
[+] Running 11/11
|
||||
✔ Network docker_ssrf_proxy_network Created 0.1s
|
||||
✔ Network docker_default Created 0.0s
|
||||
✔ Container docker-redis-1 Started 2.4s
|
||||
✔ Container docker-ssrf_proxy-1 Started 2.8s
|
||||
✔ Container docker-sandbox-1 Started 2.7s
|
||||
✔ Container docker-web-1 Started 2.7s
|
||||
✔ Container docker-weaviate-1 Started 2.4s
|
||||
✔ Container docker-db-1 Started 2.7s
|
||||
✔ Container docker-api-1 Started 6.5s
|
||||
✔ Container docker-worker-1 Started 6.4s
|
||||
✔ Container docker-nginx-1 Started 7.1s
|
||||
```
|
||||
```bash
|
||||
[+] Running 13/13
|
||||
✔ Network docker_ssrf_proxy_network Created 10.0s
|
||||
✔ Network docker_default Created 0.1s
|
||||
✔ Container docker-sandbox-1 Started 0.3s
|
||||
✔ Container docker-db_postgres-1 Healthy 2.8s
|
||||
✔ Container docker-web-1 Started 0.3s
|
||||
✔ Container docker-redis-1 Started 0.3s
|
||||
✔ Container docker-ssrf_proxy-1 Started 0.4s
|
||||
✔ Container docker-weaviate-1 Started 0.3s
|
||||
✔ Container docker-worker_beat-1 Started 3.2s
|
||||
✔ Container docker-api-1 Started 3.2s
|
||||
✔ Container docker-worker-1 Started 3.2s
|
||||
✔ Container docker-plugin_daemon-1 Started 3.2s
|
||||
✔ Container docker-nginx-1 Started 7.1s
|
||||
```
|
||||
|
||||
最後に、すべてのコンテナが正常に動作しているかを確認します:
|
||||
5. すべてのコンテナが正常に動作しているかを確認します
|
||||
|
||||
```bash
|
||||
docker compose ps
|
||||
```
|
||||
```bash
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
これには3つのコアサービス:`api / worker / web`と、6つの依存コンポーネント:`weaviate / db / redis / nginx / ssrf_proxy / sandbox`が含まれます。
|
||||
これは5つのビジネスサービス `api / worker / worker_beat / web / plugin_daemon` と6つの基礎コンポーネント `weaviate / db_postgres / redis / nginx / ssrf_proxy / sandbox` を含まれます。
|
||||
|
||||
```bash
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
docker-api-1 langgenius/dify-api:0.6.13 "/bin/bash /entrypoi…" api About a minute ago Up About a minute 5001/tcp
|
||||
docker-db-1 postgres:15-alpine "docker-entrypoint.s…" db About a minute ago Up About a minute (healthy) 5432/tcp
|
||||
docker-nginx-1 nginx:latest "sh -c 'cp /docker-e…" nginx About a minute ago Up About a minute 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp
|
||||
docker-redis-1 redis:6-alpine "docker-entrypoint.s…" redis About a minute ago Up About a minute (healthy) 6379/tcp
|
||||
docker-sandbox-1 langgenius/dify-sandbox:0.2.1 "/main" sandbox About a minute ago Up About a minute
|
||||
docker-ssrf_proxy-1 ubuntu/squid:latest "sh -c 'cp /docker-e…" ssrf_proxy About a minute ago Up About a minute 3128/tcp
|
||||
docker-weaviate-1 semitechnologies/weaviate:1.19.0 "/bin/weaviate --hos…" weaviate About a minute ago Up About a minute
|
||||
docker-web-1 langgenius/dify-web:0.6.13 "/bin/sh ./entrypoin…" web About a minute ago Up About a minute 3000/tcp
|
||||
docker-worker-1 langgenius/dify-api:0.6.13 "/bin/bash /entrypoi…" worker About a minute ago Up About a minute 5001/tcp
|
||||
```
|
||||
```bash
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
docker-api-1 langgenius/dify-api:1.10.1 "/bin/bash /entrypoi…" api 26 seconds ago Up 22 seconds 5001/tcp
|
||||
docker-db_postgres-1 postgres:15-alpine "docker-entrypoint.s…" db_postgres 26 seconds ago Up 25 seconds (healthy) 5432/tcp
|
||||
docker-nginx-1 nginx:latest "sh -c 'cp /docker-e…" nginx 26 seconds ago Up 22 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp
|
||||
docker-plugin_daemon-1 langgenius/dify-plugin-daemon:0.4.1-local "/bin/bash -c /app/e…" plugin_daemon 26 seconds ago Up 22 seconds 0.0.0.0:5003->5003/tcp, :::5003->5003/tcp
|
||||
docker-redis-1 redis:6-alpine "docker-entrypoint.s…" redis 26 seconds ago Up 25 seconds (health: starting) 6379/tcp
|
||||
docker-sandbox-1 langgenius/dify-sandbox:0.2.12 "/main" sandbox 26 seconds ago Up 25 seconds (health: starting)
|
||||
docker-ssrf_proxy-1 ubuntu/squid:latest "sh -c 'cp /docker-e…" ssrf_proxy 26 seconds ago Up 25 seconds 3128/tcp
|
||||
docker-weaviate-1 semitechnologies/weaviate:1.27.0 "/bin/weaviate --hos…" weaviate 26 seconds ago Up 25 seconds
|
||||
docker-web-1 langgenius/dify-web:1.10.1 "/bin/sh ./entrypoin…" web 26 seconds ago Up 25 seconds 3000/tcp
|
||||
docker-worker-1 langgenius/dify-api:1.10.1 "/bin/bash /entrypoi…" worker 26 seconds ago Up 22 seconds 5001/tcp
|
||||
docker-worker_beat-1 langgenius/dify-api:1.10.1 "/bin/bash /entrypoi…" worker_beat 26 seconds ago Up 22 seconds
|
||||
```
|
||||
|
||||
これらの手順により、Difyを正常にインストールできるはずです。
|
||||
|
||||
### Difyのアップグレード
|
||||
## Difyのアップグレード
|
||||
|
||||
difyソースコードのdockerディレクトリに移動し、以下のコマンドを実行します:
|
||||
|
||||
@@ -135,12 +139,13 @@ docker compose pull
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
#### 環境変数設定の同期(重要)
|
||||
<Note>
|
||||
* `.env.example`ファイルが更新されている場合は、必ずローカルの`.env`ファイルをそれに応じて変更してください。
|
||||
|
||||
* `.env.example`ファイルが更新されている場合は、必ずローカルの`.env`ファイルをそれに応じて変更してください。
|
||||
* 実際の環境に合わせて`.env`ファイルの設定項目を確認・変更してください。`.env.example`から新しい変数を`.env`ファイルに追加し、変更された値を更新する必要がある場合があります。
|
||||
* 実際の環境に合わせて`.env`ファイルの設定項目を確認・変更してください。`.env.example`から新しい変数を`.env`ファイルに追加し、変更された値を更新する必要がある場合があります。
|
||||
</Note>
|
||||
|
||||
### Difyへのアクセス
|
||||
## Difyへのアクセス
|
||||
|
||||
管理者初期化ページにアクセスして、管理者アカウントを設定します:
|
||||
|
||||
@@ -162,7 +167,7 @@ http://localhost
|
||||
http://your_server_ip
|
||||
```
|
||||
|
||||
### Difyのカスタマイズ
|
||||
## Difyのカスタマイズ
|
||||
|
||||
`.env`ファイルの環境変数値を直接編集します。その後、以下のコマンドでDifyを再起動します:
|
||||
|
||||
@@ -171,8 +176,10 @@ docker compose down
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
完全な注釈付き環境変数セットは docker/.env.example で見つけることができます。
|
||||
<Tip>
|
||||
完全な注釈付き環境変数セットは docker/.env.example で見つけることができます。詳細については、[環境変数](/ja/self-host/configuration/environments)を参照してください。
|
||||
</Tip>
|
||||
|
||||
### 詳細情報
|
||||
## 詳細情報
|
||||
|
||||
ご質問がある場合は、[FAQ](/ja/self-host/quick-start/faqs)を参照してください。
|
||||
Reference in New Issue
Block a user