Files
claude-outlonok/docker-compose.yml
huangzhenpc 889f4f15d5 Optimize database and deployment: fix SQL injection, async auth, persist data
- 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>
2026-03-06 00:57:35 +08:00

33 lines
848 B
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.

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