-
Notifications
You must be signed in to change notification settings - Fork 918
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (31 loc) · 858 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (31 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
services:
tgbot:
build: .
container_name: sheerid-tgbot
restart: unless-stopped
# 环境变量
environment:
- TZ=Asia/Shanghai
- PYTHONUNBUFFERED=1
# Telegram Bot 配置
- BOT_TOKEN=${BOT_TOKEN}
- CHANNEL_USERNAME=${CHANNEL_USERNAME:-pk_oa}
- CHANNEL_URL=${CHANNEL_URL:-https://t.me/pk_oa}
- ADMIN_USER_ID=${ADMIN_USER_ID}
# MySQL配置
- MYSQL_HOST=${MYSQL_HOST:-localhost}
- MYSQL_PORT=${MYSQL_PORT:-3306}
- MYSQL_USER=${MYSQL_USER:-tgbot_user}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE:-tgbot_verify}
# 日志持久化
volumes:
- ./logs:/app/logs
# 日志配置
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# 网络模式
network_mode: bridge