feat: expand EasyCode software factory workflows

This commit is contained in:
王鹏
2026-07-15 12:48:50 +08:00
parent fcfa4374d7
commit 79dea897bc
1108 changed files with 163774 additions and 21593 deletions

View File

@@ -0,0 +1,20 @@
# Preview Worker Deployment
The web application only enqueues persistent preview jobs. A separate deployment must run the same application with:
```text
EASYCODE_PREVIEW_EXECUTION_MODE=persistent
EASYCODE_PREVIEW_WORKER_ENABLED=true
EASYCODE_PREVIEW_WORKER_ROOT=/data/preview-worker
EASYCODE_PREVIEW_DOCKER_IMAGE=easycode/preview-worker:v1
```
Build the runtime image:
```bash
docker build -t easycode/preview-worker:v1 deploy/preview-worker
```
The web and Worker deployments must share the control database and the configured Worker root volume so the authenticated screenshot endpoint can read `output/screenshot.png`. Only the Worker deployment needs Docker access. The web deployment must use `EASYCODE_PREVIEW_EXECUTION_MODE=persistent` and keep `EASYCODE_PREVIEW_WORKER_ENABLED=false`. Local development defaults to `host` mode and does not require Docker.
The runtime publishes one constrained container port, waits for `/output/ready`, stores bounded logs and a Chromium screenshot, and is stopped by the durable Job TTL. Docker failures remain explicit; there is no host-process fallback.