-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #520 from yuiseki/docs/update-docker-instructions
docs: update Docker Compose setup documentation
- Loading branch information
Showing
2 changed files
with
110 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
## TRIDENTの開発方法 | ||
|
||
### Docker と docker compose を使用する場合 | ||
|
||
```bash | ||
git clone [email protected]:yuiseki/TRIDENT.git | ||
cd TRIDENT | ||
|
||
# TRIDENTを起動 | ||
# 環境変数は.env.developmentから自動的に読み込まれます | ||
docker compose up | ||
``` | ||
|
||
### 動作確認方法 | ||
|
||
以下のサービスが正常に起動していることを確認してください: | ||
|
||
1. Next.js アプリケーション | ||
- URL: http://localhost:3000 | ||
- 正常に起動すると、TRIDENTのウェブインターフェースが表示されます | ||
|
||
2. Ollama サービス | ||
- ポート: 1143 (コンテナ内部では11434) | ||
- 必要なモデル(qwen2.5:1.5b、snowflake-arctic-embed:22m)が自動的にダウンロードされます | ||
|
||
3. PostgreSQL データベース | ||
- ポート: 5433 (コンテナ内部では5432) | ||
- データベース名: verceldb | ||
- ユーザー名: default | ||
- パスワード: password | ||
|
||
### トラブルシューティング | ||
|
||
1. コンテナの状態確認 | ||
```bash | ||
docker compose ps | ||
``` | ||
|
||
2. 各サービスのログ確認 | ||
```bash | ||
# 全てのログを表示 | ||
docker compose logs | ||
|
||
# 特定のサービスのログを表示 | ||
docker compose logs nextjs | ||
docker compose logs ollama | ||
docker compose logs db | ||
``` | ||
|
||
3. よくある問題と解決方法 | ||
- Ollamaモデルのダウンロードに時間がかかる場合は、`docker compose logs ollama`で進行状況を確認できます | ||
- データベース接続エラーの場合は、`docker compose logs db`でPostgreSQLの起動状態を確認してください | ||
- ポートが既に使用されている場合は、`docker compose down`を実行してから再度起動してください | ||
|
||
### Docker を使用しない場合 | ||
|
||
```bash | ||
git clone [email protected]:yuiseki/TRIDENT.git | ||
cd TRIDENT | ||
cp .env.example .env | ||
# 必要な環境変数を設定 | ||
npm ci | ||
npm run dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,64 @@ | ||
## How to development TRIDENT | ||
## How to Develop TRIDENT | ||
|
||
### With Docker and docker compose | ||
|
||
```bash | ||
git clone [email protected]:yuiseki/TRIDENT.git | ||
cd TRIDENT | ||
cp .env.sample .env | ||
# Edit `OPENAI_API_KEY` in the `.env` file | ||
vim .env | ||
|
||
# Start up TRIDENT | ||
# Environment variables are automatically loaded from .env.development | ||
docker compose up | ||
``` | ||
|
||
### Verifying Services | ||
|
||
The following services should be running: | ||
|
||
1. Next.js Application | ||
- URL: http://localhost:3000 | ||
- When running correctly, you should see the TRIDENT web interface | ||
|
||
2. Ollama Service | ||
- Port: 1143 (mapped to 11434 inside container) | ||
- Required models (qwen2.5:1.5b and snowflake-arctic-embed:22m) will be downloaded automatically | ||
|
||
3. PostgreSQL Database | ||
- Port: 5433 (mapped to 5432 inside container) | ||
- Database: verceldb | ||
- Username: default | ||
- Password: password | ||
|
||
### Troubleshooting | ||
|
||
1. Check container status | ||
```bash | ||
docker compose ps | ||
``` | ||
|
||
2. View service logs | ||
```bash | ||
# View all logs | ||
docker compose logs | ||
|
||
# View specific service logs | ||
docker compose logs nextjs | ||
docker compose logs ollama | ||
docker compose logs db | ||
``` | ||
|
||
3. Common Issues and Solutions | ||
- If Ollama model downloads are taking time, check progress with `docker compose logs ollama` | ||
- For database connection issues, verify PostgreSQL is healthy with `docker compose logs db` | ||
- If ports are already in use, run `docker compose down` before starting again | ||
|
||
### Without Docker | ||
|
||
```bash | ||
git clone [email protected]:yuiseki/TRIDENT.git | ||
cd TRIDENT | ||
# Edit `OPENAI_API_KEY` in the `.env` file | ||
vim .env | ||
cp .env.example .env | ||
# Configure required environment variables | ||
npm ci | ||
npm run dev | ||
``` |