Run the panel as its own compose project behind the host Caddy

The instance's internal Caddy is only for Stoat itself, so the panel no
longer goes through it: the bot ships its own compose project, publishes
3005 on loopback, and the host's external Caddy gives it a domain.

extra_hosts pins the instance domain to host-gateway, so the bot reaches
the API, gateway and LiveKit through the external proxy with a valid
certificate instead of depending on router NAT loopback. The old
in-project layout stays available as a fallback example, together with a
step-by-step guide for when voice fails to connect.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-09-08 23:16:04 +03:00
co-authored by Claude Opus 5
parent a9b7ccdd16
commit 62d5291cd9
6 changed files with 84 additions and 72 deletions
+19
View File
@@ -0,0 +1,19 @@
name: stoat-mbot
services:
mbot:
build: .
restart: always
env_file: .env
ports:
# Наружу не торчит: домен вешается на внешний Caddy хоста.
- "127.0.0.1:3005:3005"
extra_hosts:
# Домен Stoat резолвится в хост, где внешний Caddy держит валидный TLS.
# Так бот ходит в API, gateway и LiveKit ровно как обычный клиент,
# без зависимости от NAT loopback на роутере.
# Замените на свой домен:
- "chat.example.com:host-gateway"
volumes:
# cookies.txt для yt-dlp и/или локальная медиатека
- ./data:/data