Files
Telegram-Panel/docker-compose.yml
meoacgx 4a7e6d7057 chore: docker-compose 移除易变开关
- 不再在 compose 里固定 Sync__AutoSyncEnabled / Telegram__BotAutoSyncEnabled

- 引导用户通过面板系统设置写入 /data/appsettings.local.json,避免更新时 merge 冲突
2026-01-13 18:17:37 +08:00

43 lines
1.7 KiB
YAML
Raw 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.
services:
telegram-panel:
build:
context: .
dockerfile: ${TP_DOCKERFILE:-Dockerfile}
container_name: telegram-panel
restart: unless-stopped
ports:
- "5000:5000"
volumes:
- ./docker-data:/data
environment:
ASPNETCORE_URLS: "http://+:5000"
DOTNET_ENVIRONMENT: "Production"
# SQLite 数据库(持久化到 ./docker-data
ConnectionStrings__DefaultConnection: "Data Source=/data/telegram-panel.db"
# Sessions持久化到 ./docker-data/sessions
Telegram__SessionsPath: "/data/sessions"
# 后台登录凭据文件(持久化到 ./docker-data/admin_auth.json
AdminAuth__CredentialsPath: "/data/admin_auth.json"
# 说明:这些“易变开关”建议通过面板「系统设置」保存到 /data/appsettings.local.json 来配置,
# 不要直接改 docker-compose.yml否则 git pull 更新时容易冲突)。
# 注意:如果在这里设置了对应环境变量,会覆盖 /data/appsettings.local.json 的面板配置。
# ========== Webhook 模式配置 ==========
# 启用 Webhook 模式(启用后将使用 Webhook 替代轮询接收更新)
Telegram__WebhookEnabled: "${TP_TELEGRAM_WEBHOOK_ENABLED:-false}"
# Webhook 公网基础 URL必须是 HTTPS例如: https://your-domain.com
Telegram__WebhookBaseUrl: "${TP_TELEGRAM_WEBHOOK_BASE_URL:-}"
# Webhook 验证密钥(用于验证 Telegram 请求,建议使用随机字符串)
Telegram__WebhookSecretToken: "${TP_TELEGRAM_WEBHOOK_SECRET_TOKEN:-}"
# Docker 自身的 stdout/stderr 日志滚动,避免日志无限增长占满磁盘。
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"