config: Update default host bindings to 0.0.0.0 for improved Docker accessibility and add related documentation.

This commit is contained in:
0x5487 2026-02-19 07:23:58 +08:00
parent 988df869f6
commit a06bd8d3b1
6 changed files with 24 additions and 8 deletions

View file

@ -133,6 +133,10 @@ vim config/config.json # DISCORD_BOT_TOKEN, プロバイダーの API キ
# 3. ビルドと起動
docker compose --profile gateway up -d
> [!TIP]
> **Docker ユーザー**: デフォルトでは、Gateway は `127.0.0.1` でリッスンしており、ホストからアクセスできません。ヘルスチェックエンドポイントにアクセスしたり、ポートを公開したりする必要がある場合は、環境変数で `PICOCLAW_GATEWAY_HOST=0.0.0.0` を設定するか、`config.json` を更新してください。
# 4. ログ確認
docker compose logs -f picoclaw-gateway
@ -398,7 +402,7 @@ picoclaw gateway
"enabled": true,
"channel_secret": "YOUR_CHANNEL_SECRET",
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
"webhook_host": "127.0.0.1",
"webhook_host": "0.0.0.0",
"webhook_port": 18791,
"webhook_path": "/webhook/line",
"allow_from": []

View file

@ -165,6 +165,10 @@ vim config/config.json # Set DISCORD_BOT_TOKEN, API keys, etc.
# 3. Build & Start
docker compose --profile gateway up -d
> [!TIP]
> **Docker Users**: By default, the Gateway listens on `127.0.0.1` which is not accessible from the host. If you need to access the health endpoints or expose ports, set `PICOCLAW_GATEWAY_HOST=0.0.0.0` in your environment or update `config.json`.
# 4. Check logs
docker compose logs -f picoclaw-gateway
@ -432,7 +436,7 @@ picoclaw gateway
"enabled": true,
"channel_secret": "YOUR_CHANNEL_SECRET",
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
"webhook_host": "127.0.0.1",
"webhook_host": "0.0.0.0",
"webhook_port": 18791,
"webhook_path": "/webhook/line",
"allow_from": []

View file

@ -172,6 +172,10 @@ vim config/config.json # Configure DISCORD_BOT_TOKEN, API keys, etc.
# 3. Build & Iniciar
docker compose --profile gateway up -d
> [!TIP]
> **Usuários Docker**: Por padrão, o Gateway ouve em `127.0.0.1`, o que não é acessível a partir do host. Se você precisar acessar os endpoints de integridade ou expor portas, defina `PICOCLAW_GATEWAY_HOST=0.0.0.0` em seu ambiente ou atualize o `config.json`.
# 4. Ver logs
docker compose logs -f picoclaw-gateway
@ -439,7 +443,7 @@ picoclaw gateway
"enabled": true,
"channel_secret": "YOUR_CHANNEL_SECRET",
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
"webhook_host": "127.0.0.1",
"webhook_host": "0.0.0.0",
"webhook_port": 18791,
"webhook_path": "/webhook/line",
"allow_from": []

View file

@ -167,9 +167,13 @@ cd picoclaw
cp config/config.example.json config/config.json
vim config/config.json # 设置 DISCORD_BOT_TOKEN, API keys 等
# 3. 构建并启动
# 3. 構建並啟動
docker compose --profile gateway up -d
> [!TIP]
> **Docker 用戶**: 預設情況下Gateway 監聽 `127.0.0.1`,這在容器內無法從外部訪問。如果您需要透過端口映射訪問健康檢查接口,請在環境變量中設置 `PICOCLAW_GATEWAY_HOST=0.0.0.0` 或修改 `config.json`
# 4. 查看日志
docker compose logs -f picoclaw-gateway

View file

@ -25,7 +25,7 @@
},
"maixcam": {
"enabled": false,
"host": "127.0.0.1",
"host": "0.0.0.0",
"port": 18790,
"allow_from": []
},
@ -58,7 +58,7 @@
"enabled": false,
"channel_secret": "YOUR_LINE_CHANNEL_SECRET",
"channel_access_token": "YOUR_LINE_CHANNEL_ACCESS_TOKEN",
"webhook_host": "127.0.0.1",
"webhook_host": "0.0.0.0",
"webhook_port": 18791,
"webhook_path": "/webhook/line",
"allow_from": []

View file

@ -360,7 +360,7 @@ func DefaultConfig() *Config {
},
MaixCam: MaixCamConfig{
Enabled: false,
Host: "127.0.0.1",
Host: "0.0.0.0",
Port: 18790,
AllowFrom: FlexibleStringSlice{},
},
@ -386,7 +386,7 @@ func DefaultConfig() *Config {
Enabled: false,
ChannelSecret: "",
ChannelAccessToken: "",
WebhookHost: "127.0.0.1",
WebhookHost: "0.0.0.0",
WebhookPort: 18791,
WebhookPath: "/webhook/line",
AllowFrom: FlexibleStringSlice{},