Files
agent-fox/docker-compose.yml
2026-04-12 20:15:41 +08:00

75 lines
1.9 KiB
YAML

services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: agentfox
POSTGRES_PASSWORD: agentfox
POSTGRES_DB: agentfox
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U agentfox"]
interval: 5s
timeout: 5s
retries: 5
server:
build:
context: .
dockerfile: packages/server/Dockerfile
environment:
DATABASE_URL: postgresql://agentfox:agentfox@postgres:5432/agentfox
JWT_SECRET: ${JWT_SECRET:-change-me-in-production}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:-change-me-refresh-in-production}
API_KEY_ENCRYPTION_SECRET: ${API_KEY_ENCRYPTION_SECRET:-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID:-}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET:-}
OAUTH_CALLBACK_BASE_URL: ${OAUTH_CALLBACK_BASE_URL:-}
FRONTEND_URL: ${FRONTEND_URL:-}
SERVER_PORT: "3000"
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/api/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
mcp:
build:
context: .
dockerfile: packages/mcp/Dockerfile
environment:
DATABASE_URL: postgresql://agentfox:agentfox@postgres:5432/agentfox
MCP_PORT: "3001"
ports:
- "3001:3001"
depends_on:
server:
condition: service_healthy
docs:
build:
context: ./docs
dockerfile: Dockerfile
web:
build:
context: .
dockerfile: packages/web/Dockerfile
ports:
- "${WEB_PORT:-8088}:80"
depends_on:
- server
- mcp
- docs
volumes:
pgdata: