- Move SQLite DB to data/ directory and track in git for portability - Fix SQL injection in cleanup_old_emails (use parameterized query) - Replace sync requests with async httpx in auth.py - Enable WAL mode and foreign keys for SQLite - Add UNIQUE constraint and foreign key to account_tags table - Remove redundant indexes on primary key columns - Mount data/ volume in docker-compose for persistence - Remove unused requests dependency Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
848 B
YAML
33 lines
848 B
YAML
version: '3.8'
|
||
|
||
services:
|
||
outlook-mail-system:
|
||
build: .
|
||
container_name: outlook-mail-automation
|
||
ports:
|
||
- "5000:5000"
|
||
volumes:
|
||
# 挂载配置文件,便于修改邮箱配置
|
||
- ./config.txt:/app/config.txt
|
||
# 持久化SQLite数据库,防止容器重建丢失数据
|
||
- ./data:/app/data
|
||
# 可选:挂载日志目录
|
||
- ./logs:/app/logs
|
||
environment:
|
||
# 管理员令牌,可以通过环境变量设置
|
||
- ADMIN_TOKEN=${ADMIN_TOKEN:-admin123}
|
||
# 可选:设置时区
|
||
- TZ=Asia/Shanghai
|
||
restart: unless-stopped
|
||
healthcheck:
|
||
test: ["CMD", "curl", "-f", "http://localhost:5000/"]
|
||
interval: 30s
|
||
timeout: 10s
|
||
retries: 3
|
||
start_period: 40s
|
||
networks:
|
||
- outlook-mail-network
|
||
|
||
networks:
|
||
outlook-mail-network:
|
||
driver: bridge |