Files
Telegram-Panel/docker-compose.yml
T

38 lines
1.5 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"
# 默认关闭,避免频繁调用 Telegram API;可在系统设置里开启并保存到 /data/appsettings.local.json
Sync__AutoSyncEnabled: "false"
# 默认关闭 bot 轮询自动同步(需要时可手动同步),使用Webhook建议开启
Telegram__BotAutoSyncEnabled: "true"
# ========== 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:-}"