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