main: 扩展 Agent Run 调度与队列功能

- 增加 Agent Run MVP-0,包括 RunDispatcher 和 AgentRunJob
- 优化队列配置,支持 Redis 队列驱动,添加 Horizon 容器
- 更新 Docker 配置,细化角色分工,新增 Horizon 配置
- 增加测试任务 `TestJob`,扩展队列使用示例
- 更新 OpenAPI 规范,添加 Agent Run 相关接口及示例
- 编写文档,详细描述 Agent Run 流程与 MVP-0 功能
- 优化相关服务与文档,支持队列与异步运行
This commit is contained in:
2025-12-17 02:39:31 +08:00
parent dafa8f6b06
commit c55534ad20
42 changed files with 2596 additions and 217 deletions

84
docker-compose-backup.yml Normal file
View File

@@ -0,0 +1,84 @@
services:
app:
build:
context: .
dockerfile: docker/app/Dockerfile
image: ars_backend:latest
entrypoint: ["/app/docker/app/entrypoint.sh"]
volumes:
- ./:/app
environment:
APP_ENV: local
APP_DEBUG: "true"
APP_URL: http://localhost:8000
OCTANE_SERVER: frankenphp
DB_CONNECTION: pgsql
DB_HOST: pgsql
DB_PORT: 5432
DB_DATABASE: ars_backend
DB_USERNAME: ars
DB_PASSWORD: secret
REDIS_HOST: redis
REDIS_PASSWORD: "null"
REDIS_PORT: 6379
QUEUE_CONNECTION: redis
ports:
- "8000:8000"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- pgsql
- redis
tty: true
horizon:
build:
context: .
dockerfile: docker/app/Dockerfile
image: ars_backend:latest
entrypoint: ["/app/docker/app/entrypoint.sh"]
environment:
CONTAINER_ROLE: horizon
APP_ENV: local
APP_DEBUG: "true"
APP_URL: http://localhost:8000
OCTANE_SERVER: frankenphp
DB_CONNECTION: pgsql
DB_HOST: pgsql
DB_PORT: 5432
DB_DATABASE: ars_backend
DB_USERNAME: ars
DB_PASSWORD: secret
REDIS_HOST: redis
REDIS_PASSWORD: "null"
REDIS_PORT: 6379
QUEUE_CONNECTION: redis
volumes:
- ./:/app
depends_on:
- pgsql
- redis
tty: true
pgsql:
image: postgres:16-alpine
environment:
POSTGRES_DB: ars_backend
POSTGRES_USER: ars
POSTGRES_PASSWORD: secret
volumes:
- pgsql_data:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redis_data:/data
ports:
- "6379:6379"
volumes:
pgsql_data:
redis_data: