修改
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: |
python3 --version
pip3 --version
- name: 确保基础镜像已拉取
run: |
docker pull python:3.11-slim || true
docker pull postgres:16 || true
- name: 构建并启动前后端服务(环境变量注入)
env:

View File

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