-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
122 lines (115 loc) · 3.78 KB
/
Copy pathdocker-compose.yml
File metadata and controls
122 lines (115 loc) · 3.78 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# AdCP Sales Agent - Docker Compose for Development
#
# For local development with hot-reload.
#
# Usage:
# docker compose up
#
# Endpoints (default port 8000):
# http://localhost:8000/ - Admin UI (login here)
# http://localhost:8000/admin - Admin UI (alternate path)
# http://localhost:8000/mcp - MCP Server (for AI agents)
# http://localhost:8000/a2a - A2A Server (agent-to-agent)
#
# First-time setup:
# 1. Log in with test credentials (test_super_admin@example.com / test123)
# 2. Configure SSO in Users & Access
# 3. Disable Setup Mode once SSO is working
#
# Environment variables (optional, via .env file):
# CONDUCTOR_PORT: Change proxy port (default: 8000, useful for multiple worktrees)
# CREATE_DEMO_TENANT=true: Create demo tenant with mock adapter
services:
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: adcp
POSTGRES_USER: adcp_user
POSTGRES_PASSWORD: secure_password_change_me
volumes:
- adcp_postgres_data:/var/lib/postgresql/data
# No host port exposure - access via docker compose exec if needed
healthcheck:
test: ["CMD-SHELL", "pg_isready -U adcp_user -d adcp"]
interval: 10s
timeout: 5s
retries: 5
# Run database migrations before starting services
db-init:
build:
context: .
dockerfile: Dockerfile
entrypoint: []
env_file:
- path: .env
required: false
environment:
DATABASE_URL: postgresql://adcp_user:secure_password_change_me@postgres:5432/adcp?sslmode=disable
PYTHONPATH: "/app"
depends_on:
postgres:
condition: service_healthy
volumes:
- .:/app
command: ["python", "scripts/ops/migrate.py"]
proxy:
image: nginx:stable
volumes:
- ./config/nginx/nginx-development.conf:/etc/nginx/nginx.conf:ro
depends_on:
- adcp-server
ports:
- "${CONDUCTOR_PORT:-8000}:8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
adcp-server:
build:
context: .
dockerfile: Dockerfile
entrypoint: [] # Override image entrypoint for local dev
env_file:
- path: .env
required: false
environment:
DATABASE_URL: postgresql://adcp_user:secure_password_change_me@postgres:5432/adcp?sslmode=disable
SKIP_NGINX: "true"
SKIP_CRON: "true"
# Per-tenant Setup Mode enables test credentials for new tenants
# Override .env ports to match nginx-development.conf expectations
ADCP_SALES_PORT: "8080"
# Enable test login mode for development
ADCP_AUTH_TEST_MODE: "true"
# Development settings (venv at /opt/venv in image — see Dockerfile UV_PROJECT_ENVIRONMENT)
PYTHONPATH: "/app"
PYTHONUNBUFFERED: "1"
FLASK_ENV: development
depends_on:
postgres:
condition: service_healthy
db-init:
condition: service_completed_successfully
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
# Mount source code for hot reloading (venv lives at /opt/venv — not shadowed)
- .:/app
# Mount local adcp library directly into venv (replaces installed package)
# - ../adcp-client-python/src/adcp:/opt/venv/lib/python3.12/site-packages/adcp:ro - Uncomment for local adcp-client-python dev
# Optional: Mount audit logs
- ./audit_logs:/app/audit_logs
# Shared cache volumes for faster builds
- adcp_global_pip_cache:/root/.cache/pip
- adcp_global_uv_cache:/cache/uv
command: ["python", "scripts/run_server.py"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
adcp_postgres_data:
adcp_global_pip_cache:
adcp_global_uv_cache: