- Timezone: compute_next_run now correctly interprets cron in the schedule's configured timezone (e.g., "0 8 * * *" with Asia/Shanghai = 8AM Beijing, not UTC) - Notifications: agent_tasks now reuses pre-created execution records and calls notify_schedule_result on completion, so non-workflow agent schedules get DB notifications + Feishu webhook + Feishu app messages - Duplicate execution: execute_agent_task accepts optional execution_id to reuse the record created by schedule_service instead of creating a second one - Celery Beat: added to restart_backend_celery.ps1, stop_aiagent.ps1, and docker-compose.dev.yml; fixed repo-root path resolution in all PS1 scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
90 lines
2.5 KiB
YAML
90 lines
2.5 KiB
YAML
services:
|
||
frontend:
|
||
build:
|
||
context: ./frontend
|
||
dockerfile: Dockerfile.dev
|
||
ports:
|
||
- "8038:3000"
|
||
volumes:
|
||
- ./frontend:/app
|
||
- /app/node_modules
|
||
environment:
|
||
- VITE_API_URL=http://101.43.95.130:8037
|
||
# 注意:Vite环境变量需要在构建时设置,运行时修改需要重启容器
|
||
depends_on:
|
||
- backend
|
||
networks:
|
||
- aiagent-network
|
||
|
||
backend:
|
||
build:
|
||
context: ./backend
|
||
dockerfile: Dockerfile.dev
|
||
ports:
|
||
- "8037:8000"
|
||
volumes:
|
||
- ./backend:/app
|
||
environment:
|
||
- DATABASE_URL=mysql+pymysql://root:!Rjb12191@gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com:24936/agent_db?charset=utf8mb4
|
||
- REDIS_URL=redis://redis:6379/0
|
||
- SECRET_KEY=dev-secret-key-change-in-production
|
||
- CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://localhost:8038,http://101.43.95.130:8038
|
||
- DEEPSEEK_API_KEY=sk-fdf7cc1c73504e628ec0119b7e11b8cc
|
||
- DEEPSEEK_BASE_URL=https://api.deepseek.com
|
||
depends_on:
|
||
- redis
|
||
networks:
|
||
- aiagent-network
|
||
|
||
celery:
|
||
build:
|
||
context: ./backend
|
||
dockerfile: Dockerfile.dev
|
||
command: celery -A app.core.celery_app worker --loglevel=info
|
||
volumes:
|
||
- ./backend:/app
|
||
environment:
|
||
- DATABASE_URL=mysql+pymysql://root:!Rjb12191@gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com:24936/agent_db?charset=utf8mb4
|
||
- REDIS_URL=redis://redis:6379/0
|
||
- DEEPSEEK_API_KEY=sk-fdf7cc1c73504e628ec0119b7e11b8cc
|
||
- DEEPSEEK_BASE_URL=https://api.deepseek.com
|
||
depends_on:
|
||
- redis
|
||
- backend
|
||
networks:
|
||
- aiagent-network
|
||
|
||
celery-beat:
|
||
build:
|
||
context: ./backend
|
||
dockerfile: Dockerfile.dev
|
||
command: celery -A app.core.celery_app beat --loglevel=info
|
||
volumes:
|
||
- ./backend:/app
|
||
environment:
|
||
- DATABASE_URL=mysql+pymysql://root:!Rjb12191@gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com:24936/agent_db?charset=utf8mb4
|
||
- REDIS_URL=redis://redis:6379/0
|
||
- DEEPSEEK_API_KEY=sk-fdf7cc1c73504e628ec0119b7e11b8cc
|
||
- DEEPSEEK_BASE_URL=https://api.deepseek.com
|
||
depends_on:
|
||
- redis
|
||
- backend
|
||
networks:
|
||
- aiagent-network
|
||
|
||
redis:
|
||
image: redis:7-alpine
|
||
ports:
|
||
- "6380:6379" # 主机 6380 映射到容器 6379,避免与宿主机 6379 冲突
|
||
volumes:
|
||
- redis_data:/data
|
||
networks:
|
||
- aiagent-network
|
||
|
||
volumes:
|
||
redis_data:
|
||
|
||
networks:
|
||
aiagent-network:
|
||
driver: bridge
|