-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (84 loc) Β· 3.06 KB
/
docker-compose.yml
File metadata and controls
88 lines (84 loc) Β· 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
services:
# AgentShip API Service
agentship:
build:
context: .
dockerfile: Dockerfile
container_name: agentship-api
command: ["uvicorn", "src.service.main:app", "--host", "0.0.0.0", "--port", "7001", "--reload"]
ports:
- "7001:7001"
env_file:
- .env
environment:
- ENVIRONMENT=docker
- LOG_LEVEL=INFO
- OPIK_LOGGING_FILE=/tmp/opik.log
# Override localhost -> postgres for Docker networking
- AGENT_SESSION_STORE_URI=postgresql://agentship_user:agentship_password@postgres:5432/agentship_session_store
# Auth database (separate from session store) - for MCP OAuth tokens
- AGENTSHIP_AUTH_DB_URI=postgresql://agentship_user:agentship_password@postgres:5432/agentship_auth
- AGENT_SHORT_TERM_MEMORY=Database
# Backend API runs on host machine (localhost:5001), use host.docker.internal to reach it from container
- BACKEND_URL=http://host.docker.internal:5001
# MCP OAuth Configuration (loaded from .env)
- MCP_TOKEN_ENCRYPTION_KEY=${MCP_TOKEN_ENCRYPTION_KEY}
- OAUTH_CALLBACK_BASE_URL=${OAUTH_CALLBACK_BASE_URL:-http://localhost:7001}
# OAuth Provider Credentials (loaded from .env)
- GITHUB_OAUTH_CLIENT_ID=${GITHUB_OAUTH_CLIENT_ID}
- GITHUB_OAUTH_CLIENT_SECRET=${GITHUB_OAUTH_CLIENT_SECRET}
- SLACK_OAUTH_CLIENT_ID=${SLACK_OAUTH_CLIENT_ID}
- SLACK_OAUTH_CLIENT_SECRET=${SLACK_OAUTH_CLIENT_SECRET}
- GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID}
- GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET}
volumes:
# Mount source code for development (hot-reload)
- ./src:/app/src
- ./tests:/app/tests
- ./studio:/app/studio
- ./docs_sphinx/build:/app/docs_sphinx/build
- ./.mcp.settings.json:/app/.mcp.settings.json
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- agentship-network
# Enable host.docker.internal for Linux (already works on Docker Desktop Mac/Windows)
extra_hosts:
- "host.docker.internal:host-gateway"
# PostgreSQL Database for Session Storage
# Note: Studio is mounted at /studio on the main agentship service
postgres:
image: postgres:16-alpine
container_name: agentship-postgres
environment:
POSTGRES_USER: agentship_user
POSTGRES_PASSWORD: agentship_password
# Create both databases on startup
POSTGRES_MULTIPLE_DATABASES: agentship_session_store,agentship_auth
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/postgres-init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U agentship_user"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- agentship-network
volumes:
postgres_data:
driver: local
networks:
agentship-network:
driver: bridge