修改
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 25m13s

This commit is contained in:
2026-04-14 01:10:02 +08:00
parent d450efa4d0
commit 93ec2b5b8e
2 changed files with 8 additions and 6 deletions

View File

@@ -16,6 +16,10 @@ jobs:
run: | run: |
python3 --version python3 --version
pip3 --version pip3 --version
- name: 确保基础镜像已拉取
run: |
docker pull python:3.11-slim || true
docker pull postgres:16 || true
- name: 构建并启动前后端服务(环境变量注入) - name: 构建并启动前后端服务(环境变量注入)
env: env:

View File

@@ -1,18 +1,16 @@
version: '3.8'
services: services:
postgres: postgres:
image: postgres:16 image: postgres:16
container_name: ai-postgres container_name: ai-postgres
environment: environment:
POSTGRES_PASSWORD: mysecretpassword # 请替换为强密码 POSTGRES_PASSWORD: mysecretpassword # 请替换为强密码
POSTGRES_DB: langgraph_db POSTGRES_DB: langgraph_db
volumes: volumes:
- pg_data:/var/lib/postgresql/data - pg_data:/var/lib/postgresql/data
networks: networks:
- ai-network - ai-network
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
@@ -23,7 +21,7 @@ services:
backend: backend:
build: build:
context: .. # 构建上下文为项目根目录 context: .. # 构建上下文为项目根目录
dockerfile: docker/Dockerfile.backend dockerfile: docker/Dockerfile.backend
container_name: ai-backend container_name: ai-backend
environment: environment:
@@ -31,7 +29,7 @@ services:
- VLLM_LOCAL_KEY=${VLLM_LOCAL_KEY} - VLLM_LOCAL_KEY=${VLLM_LOCAL_KEY}
- DB_URI=postgresql://postgres:mysecretpassword@postgres:5432/langgraph_db?sslmode=disable - DB_URI=postgresql://postgres:mysecretpassword@postgres:5432/langgraph_db?sslmode=disable
volumes: volumes:
- ../data/user_docs:/app/data/user_docs # 挂载文档目录 - ../data/user_docs:/app/data/user_docs # 挂载文档目录
- ../logs:/app/logs - ../logs:/app/logs
networks: networks:
- ai-network - ai-network