Files
study-tool/docker-compose.yml
T
study-tool 585a7a28dd feat: study modes (fast/parallel) and course-container completion fix
- settings: study.mode fast|normal and study.parallel 1-5

- normal mode: one headless browser per video, visibility keep-alive, auto-degrade when the platform enforces order

- report study/log/detail/save before isComplete; drop lastProgressTime on completion

- complete periodType 10/13 container nodes and recompute counters via PUT calFinalScore

- capture mode: POST /api/capture records all XHR/fetch including new tabs

- UI: study mode in settings, capture / stop-capture menu items
2026-10-27 22:30:57 +08:00

40 lines
1.4 KiB
YAML

# 多账号学习控制台 —— Docker 部署
# docker compose up -d --build 起服务
# docker compose logs -f 看日志
# docker compose down 停服务(data/ 卷保留,账号和设置不丢)
#
# 远程管理:确保 .env 里设了 AUTH_TOKEN,再用 http://<服务器IP>:8848/?token=<AUTH_TOKEN> 打开
services:
study-tool:
build:
context: .
args:
# 直链视频(fileType=other)要 Chromium 真播到结尾;不要就把这里改成 "0"(镜像小很多)
WITH_PLAYWRIGHT: "1"
image: study-tool:latest
container_name: study-tool
restart: unless-stopped
ports:
- "${BIND_ADDR:-0.0.0.0}:${PORT:-8848}:8848"
environment:
HOST: 0.0.0.0
PORT: "8848"
DATA_DIR: /app/data
DB_PATH: /app/data/study.db
# 远程访问令牌;留空 = 不校验(只在自己内网用)。改这里要同步 .env
AUTH_TOKEN: ${AUTH_TOKEN:-}
# 每个账号保留的日志行数 / 页面快照条数
RUN_LOG_KEEP: ${RUN_LOG_KEEP:-2000}
SNAPSHOT_KEEP: ${SNAPSHOT_KEEP:-200}
TZ: ${TZ:-Asia/Shanghai}
volumes:
# 唯一的持久化目录:SQLite 库(study.db + -wal/-shm)都在这里
- ./data:/app/data
# Chromium 在容器里默认只有 64MB /dev/shm,跑直链视频会崩
shm_size: "1gb"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"