Files
Telegram-Panel/docker-compose.yml
meoacgx bd454decf6 docs(docker): 精简部署文档并切换为 GHCR 镜像优先
本次变更:
- README 删除冗长 CI/Release 说明,保留稳定版/开发版的 docker pull + docker run 直接命令。
- README 的 Docker 一键部署改为 compose 拉取远程镜像流程(稳定版默认、开发版切换 TP_IMAGE)。
- docker-compose.yml 默认使用 ghcr.io/moeacgx/telegram-panel:latest,并设置 pull_policy=always,优先远程镜像部署。
- .env.example 新增 TP_IMAGE 配置说明,默认 latest,可一行切换 dev-latest。
2026-03-03 02:38:29 +08:00

42 lines
1.8 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:
image: ${TP_IMAGE:-ghcr.io/moeacgx/telegram-panel:latest}
pull_policy: always
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"