主要更新: - 新增 security/ 安全模块 (风险评估、威胁检测、蜜罐等) - Dockerfile 添加 curl 以支持 Docker 健康检查 - 前端页面更新 (管理后台、用户端) - 数据库迁移和 schema 更新 - 新增 kdocs 上传服务 - 添加安全相关测试用例 Co-Authored-By: Claude <noreply@anthropic.com>
58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
knowledge-automation:
|
|
build: .
|
|
container_name: knowledge-automation-multiuser
|
|
ports:
|
|
- "51232:51233"
|
|
volumes:
|
|
- ./data:/app/data
|
|
- ./logs:/app/logs
|
|
- ./截图:/app/截图
|
|
- ./playwright:/ms-playwright
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- ./static:/app/static
|
|
- ./templates:/app/templates
|
|
- ./app.py:/app/app.py
|
|
- ./database.py:/app/database.py
|
|
# 代码热更新
|
|
- ./services:/app/services
|
|
- ./routes:/app/routes
|
|
- ./db:/app/db
|
|
- ./security:/app/security
|
|
- ./realtime:/app/realtime
|
|
- ./api_browser.py:/app/api_browser.py
|
|
- ./app_config.py:/app/app_config.py
|
|
- ./app_logger.py:/app/app_logger.py
|
|
- ./app_security.py:/app/app_security.py
|
|
- ./browser_pool_worker.py:/app/browser_pool_worker.py
|
|
- ./crypto_utils.py:/app/crypto_utils.py
|
|
- ./db_pool.py:/app/db_pool.py
|
|
- ./email_service.py:/app/email_service.py
|
|
- ./password_utils.py:/app/password_utils.py
|
|
- ./playwright_automation.py:/app/playwright_automation.py
|
|
- ./task_checkpoint.py:/app/task_checkpoint.py
|
|
dns:
|
|
- 223.5.5.5
|
|
- 114.114.114.114
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
- PYTHONUNBUFFERED=1
|
|
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
|
- FLASK_ENV=production
|
|
- SERVER_HOST=0.0.0.0
|
|
- SERVER_PORT=51233
|
|
- LOG_LEVEL=INFO
|
|
restart: unless-stopped
|
|
shm_size: 2gb
|
|
mem_limit: 4g
|
|
mem_reservation: 2g
|
|
cpus: '2.0'
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:51233 || exit 1"]
|
|
interval: 5m
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|