mirror of
https://github.com/Evil0ctal/WeChat-Channels-Video-File-Decryption.git
synced 2026-04-01 01:13:17 +08:00
问题修复: - 添加请求锁机制防止并发访问同一页面导致的竞态条件 - 添加页面健康检查函数,在请求前验证页面有效性 - 添加自动恢复机制,页面失效时自动重置浏览器 - 为 page.evaluate 添加超时保护,根据文件大小动态计算超时时间 新功能: - 实现 PagePool 页面池管理器,支持并发处理多个解密请求 - 新增 POST /api/decrypt-concurrent 并发解密接口 - 新增 GET /api/pool-status 页面池状态查询接口 - 支持通过 POOL_SIZE 环境变量配置页面池大小(默认3) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
1.0 KiB
YAML
54 lines
1.0 KiB
YAML
version: '3.8'
|
|
|
|
name: wechat-decrypt-api
|
|
|
|
services:
|
|
wechat-decrypt-api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: wechat-decrypt-api:playwright
|
|
container_name: wechat-decrypt-api
|
|
|
|
ports:
|
|
- "3000:3000"
|
|
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=3000
|
|
- POOL_SIZE=3
|
|
|
|
restart: unless-stopped
|
|
|
|
# Resource limits
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2'
|
|
memory: 2G
|
|
reservations:
|
|
cpus: '1'
|
|
memory: 512M
|
|
|
|
# Security options
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
|
|
# Health check
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1); }).on('error', () => process.exit(1));"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
|
|
# Shared memory size for Chromium
|
|
shm_size: '2gb'
|
|
|
|
networks:
|
|
- wechat-decrypt-network
|
|
|
|
networks:
|
|
wechat-decrypt-network:
|
|
driver: bridge
|