refactor(docker): consolidate compose files and move config to config/ directory

- Deleted docker-compose.discord.yml and merged into docker-compose.yml
- Moved config.example.json to config/
- Updated volume mounts to use ./config/config.json
- Updated verify script permissions (implied if valid)
This commit is contained in:
Sunwood-ai-labs
2026-02-12 00:44:10 +09:00
committed by lxowalle
parent 2997ea0b01
commit 759f4cfe25
5 changed files with 56 additions and 83 deletions

View File

@@ -129,18 +129,17 @@ git clone https://github.com/Sunwood-AI-OSS-Hub/picoclaw.git
cd picoclaw cd picoclaw
# 2. API キーを設定 # 2. API キーを設定
cp .env.example .env cp config.example.json config/config.json
vim .env # DISCORD_BOT_TOKEN, OPENROUTER_API_KEY などを設定 vim config/config.json # DISCORD_BOT_TOKEN, プロバイダーの API キーを設定
vim config/config.json # プロバイダーの API キーを設定
# 3. ビルドと起動 # 3. ビルドと起動
docker compose -f docker-compose.discord.yml up -d docker compose --profile gateway up -d
# 4. ログ確認 # 4. ログ確認
docker compose -f docker-compose.discord.yml logs -f picoclaw docker compose logs -f picoclaw-gateway
# 5. 停止 # 5. 停止
docker compose -f docker-compose.discord.yml down docker compose --profile gateway down
``` ```
### Agent モード(ワンショット) ### Agent モード(ワンショット)
@@ -156,8 +155,8 @@ docker compose run --rm picoclaw-agent
### リビルド ### リビルド
```bash ```bash
docker compose -f docker-compose.discord.yml build --no-cache docker compose --profile gateway build --no-cache
docker compose -f docker-compose.discord.yml up -d docker compose --profile gateway up -d
``` ```
### 🚀 クイックスタート(ネイティブ) ### 🚀 クイックスタート(ネイティブ)
@@ -306,53 +305,37 @@ picoclaw gateway
</details> </details>
## ⚙️ 設定 ## 設定 (Configuration)
設定ファイル: `~/.picoclaw/config.json` PicoClaw は設定に `config.json` を使用します。
### プロバイダー 1. **設定ファイルの作成:**
> [!NOTE] サンプル設定ファイルをコピーします:
> Groq は Whisper 経由の無料音声文字起こしを提供します。設定すると、Telegram の音声メッセージが自動的に文字起こしされます。
| プロバイダー | 用途 | API キー取得先 | ```bash
|-------------|------|---------------| cp config.example.json config/config.json
| `gemini` | LLM (Gemini 直接) | [aistudio.google.com](https://aistudio.google.com) | ```
| `zhipu` | LLM (Zhipu 直接) | [bigmodel.cn](bigmodel.cn) |
| `openrouter(テスト中)` | LLM推奨、全モデルアクセス | [openrouter.ai](https://openrouter.ai) |
| `anthropic(テスト中)` | LLM (Claude 直接) | [console.anthropic.com](https://console.anthropic.com) |
| `openai(テスト中)` | LLM (GPT 直接) | [platform.openai.com](https://platform.openai.com) |
| `deepseek(テスト中)` | LLM (DeepSeek 直接) | [platform.deepseek.com](https://platform.deepseek.com) |
| `groq` | LLM + **音声文字起こし** (Whisper) | [console.groq.com](https://console.groq.com) |
2. **設定の編集:**
<details> `config/config.json` を開き、APIキーや設定を記述します。
<summary><b>Zhipu</b></summary>
**1. API キーとベース URL を取得** ```json
- [API キー](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) を取得 {
"providers": {
**2. 設定** "openrouter": {
"api_key": "sk-or-v1-..."
```json }
{ },
"agents": { "channels": {
"defaults": { "discord": {
"workspace": "~/.picoclaw/workspace", "enabled": true,
"model": "glm-4.7", "token": "YOUR_DISCORD_BOT_TOKEN"
"max_tokens": 8192, }
"temperature": 0.7, }
"max_tool_iterations": 20
} }
}, ```
"providers": {
"zhipu": {
"api_key": "Your API Key",
"api_base": "https://open.bigmodel.cn/api/paas/v4"
},
},
}
```
**3. 実行** **3. 実行**

View File

@@ -132,18 +132,17 @@ git clone https://github.com/Sunwood-AI-OSS-Hub/picoclaw.git
cd picoclaw cd picoclaw
# 2. Set your API keys # 2. Set your API keys
cp .env.example .env cp config.example.json config/config.json
vim .env # Set DISCORD_BOT_TOKEN, OPENROUTER_API_KEY, etc. vim config/config.json # Set DISCORD_BOT_TOKEN, API keys, etc.
vim config/config.json # Set provider API keys
# 3. Build & Start # 3. Build & Start
docker compose -f docker-compose.discord.yml up -d docker compose --profile gateway up -d
# 4. Check logs # 4. Check logs
docker compose -f docker-compose.discord.yml logs -f picoclaw docker compose logs -f picoclaw-gateway
# 5. Stop # 5. Stop
docker compose -f docker-compose.discord.yml down docker compose --profile gateway down
``` ```
### Agent Mode (One-shot) ### Agent Mode (One-shot)
@@ -159,8 +158,8 @@ docker compose run --rm picoclaw-agent
### Rebuild ### Rebuild
```bash ```bash
docker compose -f docker-compose.discord.yml build --no-cache docker compose --profile gateway build --no-cache
docker compose -f docker-compose.discord.yml up -d docker compose --profile gateway up -d
``` ```
### 🚀 Quick Start ### 🚀 Quick Start

View File

@@ -1,24 +0,0 @@
services:
# ─────────────────────────────────────────────
# PicoClaw Discord Bot
# ─────────────────────────────────────────────
picoclaw:
build:
context: .
dockerfile: Dockerfile
container_name: picoclaw-discord
restart: unless-stopped
env_file:
- .env
environment:
- PICOCLAW_CHANNELS_DISCORD_ENABLED=true
- PICOCLAW_CHANNELS_DISCORD_TOKEN=${DISCORD_BOT_TOKEN}
volumes:
# Configuration file
- ./config/config.json:/root/.picoclaw/config.json:ro
# Persistent workspace (sessions, memory, logs)
- picoclaw-workspace:/root/.picoclaw/workspace
command: ["gateway"]
volumes:
picoclaw-workspace:

View File

@@ -1,6 +1,4 @@
services: services:
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
# PicoClaw Agent (one-shot query) # PicoClaw Agent (one-shot query)
# docker compose run --rm picoclaw-agent -m "Hello" # docker compose run --rm picoclaw-agent -m "Hello"
@@ -12,8 +10,6 @@ services:
container_name: picoclaw-agent container_name: picoclaw-agent
profiles: profiles:
- agent - agent
env_file:
- .env
volumes: volumes:
- ./config/config.json:/root/.picoclaw/config.json:ro - ./config/config.json:/root/.picoclaw/config.json:ro
- picoclaw-workspace:/root/.picoclaw/workspace - picoclaw-workspace:/root/.picoclaw/workspace
@@ -21,5 +17,24 @@ services:
stdin_open: true stdin_open: true
tty: true tty: true
# ─────────────────────────────────────────────
# PicoClaw Gateway (Long-running Bot)
# docker compose up picoclaw-gateway
# ─────────────────────────────────────────────
picoclaw-gateway:
build:
context: .
dockerfile: Dockerfile
container_name: picoclaw-gateway
restart: unless-stopped
profiles:
- gateway
volumes:
# Configuration file
- ./config/config.json:/root/.picoclaw/config.json:ro
# Persistent workspace (sessions, memory, logs)
- picoclaw-workspace:/root/.picoclaw/workspace
command: ["gateway"]
volumes: volumes:
picoclaw-workspace: picoclaw-workspace: