Files
chatgpt-on-wechat/docs/ja/guide/upgrade.mdx
2026-03-29 17:57:12 +08:00

62 lines
1.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: アップデート
description: CowAgent のアップグレード方法
---
## コマンドによるアップグレード(推奨)
`cow update` でコードの更新とサービスの再起動をワンクリックで実行できます:
```bash
cow update
```
このコマンドは以下のフローを自動的に実行します:
1. 最新コードをプル(`git pull`
2. 現在のサービスを停止
3. Python 依存パッケージを更新
4. CLI を再インストール
5. サービスを起動
<Note>
Cow CLI がインストールされていない場合は、`./run.sh update` でも同様の操作が可能です。
</Note>
## 手動アップグレード
プロジェクトのルートディレクトリで以下を実行します:
```bash
git pull
pip3 install -r requirements.txt
pip3 install -e .
```
更新完了後、サービスを再起動します:
```bash
# Cow CLI を使用
cow restart
# または run.sh を使用
./run.sh restart
# または nohup で直接実行
kill $(ps -ef | grep app.py | grep -v grep | awk '{print $2}')
nohup python3 app.py & tail -f nohup.out
```
## Docker アップグレード
`docker-compose.yml` があるディレクトリで以下を実行します:
```bash
sudo docker compose pull
sudo docker compose up -d
```
<Tip>
アップグレード前に `config.json` 設定ファイルのバックアップを推奨します。Docker 環境でデータを保持する場合は、volume マウントでワークスペースディレクトリを永続化できます。
</Tip>