feat: add Docker Compose setup with Dockerfiles for all services

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 13:39:21 +08:00
parent c3f8b598af
commit f5907892bf
8 changed files with 229 additions and 0 deletions

57
docker-compose.yml Normal file
View File

@@ -0,0 +1,57 @@
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: agentfox
POSTGRES_PASSWORD: agentfox
POSTGRES_DB: agentfox
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
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}
SERVER_PORT: "3000"
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
mcp:
build:
context: .
dockerfile: packages/mcp/Dockerfile
environment:
DATABASE_URL: postgresql://agentfox:agentfox@postgres:5432/agentfox
MCP_PORT: "3001"
ports:
- "3001:3001"
depends_on:
postgres:
condition: service_healthy
web:
build:
context: .
dockerfile: packages/web/Dockerfile
ports:
- "80:80"
depends_on:
- server
- mcp
volumes:
pgdata: