-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
191 lines (184 loc) · 6.22 KB
/
Copy pathdocker-compose.e2e.yml
File metadata and controls
191 lines (184 loc) · 6.22 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# Bounded container logs: the 2026-07-18 soak filled the stand's disk with
# unrotated json-file logs (TM alone grew to 3.8G) and took the pipeline down.
x-logging: &default-logging
driver: json-file
options:
max-size: "50m"
max-file: "3"
services:
redis:
logging: *default-logging
image: redis:7.4-alpine
command: ["redis-server", "--save", "", "--appendonly", "no"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 20
deploy:
resources:
limits:
cpus: "0.50"
memory: 256M
kafka:
logging: *default-logging
image: confluentinc/cp-kafka:7.7.0
hostname: kafka
ports:
- "19092:19092"
environment:
CLUSTER_ID: "MkU3OEVBNTcwNTJENDM2Qk"
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:29093,EXTERNAL://0.0.0.0:19092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,EXTERNAL://localhost:19092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:29093
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_MIN_INSYNC_REPLICAS: 1
KAFKA_NUM_PARTITIONS: 3
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1
KAFKA_LOG_DIRS: /var/lib/kafka/data
KAFKA_HEAP_OPTS: "-Xms256m -Xmx512m"
healthcheck:
test: ["CMD-SHELL", "kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1"]
interval: 10s
timeout: 10s
retries: 12
start_period: 15s
deploy:
resources:
limits:
cpus: "1.00"
memory: 1G
clickhouse:
logging: *default-logging
image: clickhouse/clickhouse-server:24.8
environment:
CLICKHOUSE_DB: agentflow
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: ""
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8123/ping | grep -q 'Ok.'"]
interval: 10s
timeout: 10s
retries: 12
start_period: 10s
deploy:
resources:
limits:
cpus: "1.00"
memory: 1G
postgres:
logging: *default-logging
image: postgres:16-alpine
environment:
POSTGRES_DB: agentflow
POSTGRES_USER: agentflow
POSTGRES_PASSWORD: agentflow
healthcheck:
test: ["CMD-SHELL", "pg_isready -U agentflow -d agentflow"]
interval: 5s
timeout: 5s
retries: 20
deploy:
resources:
limits:
cpus: "0.50"
memory: 512M
serving-init:
logging: *default-logging
# The API stopped provisioning and seeding the serving store on boot
# (audit P0-2), so the stack lays the schema and the documented demo
# entities down itself before the API starts — the same one-shot job
# docker-compose.prod.yml runs, against the in-stack ClickHouse the E2E
# smoke suite queries.
build:
context: .
dockerfile: Dockerfile.api
depends_on:
clickhouse:
condition: service_healthy
environment:
AGENTFLOW_SERVING_CONFIG: /app/config/serving.yaml
DUCKDB_PATH: /app/data/agentflow.duckdb
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_PORT: 8123
CLICKHOUSE_DATABASE: agentflow
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: ""
command: ["python", "-m", "src.serving.provision", "--schema", "--seed"]
restart: "no"
volumes:
- agentflow-api-data:/app/data
- ./config:/app/config:ro
agentflow-api:
logging: *default-logging
build:
context: .
dockerfile: Dockerfile.api
depends_on:
redis:
condition: service_healthy
kafka:
condition: service_healthy
postgres:
condition: service_healthy
clickhouse:
condition: service_healthy
serving-init:
condition: service_completed_successfully
ports:
- "8000:8000"
environment:
AGENTFLOW_SERVING_CONFIG: /app/config/serving.yaml
AGENTFLOW_API_KEYS: ${AGENTFLOW_API_KEYS:-af-prod-agent-support-abc123:Support Agent,af-prod-agent-ops-def456:Ops Agent,af-prod-agent-rate-e2e000:Rate Limit Agent}
AGENTFLOW_RATE_LIMIT_RPM: ${AGENTFLOW_RATE_LIMIT_RPM:-120}
AGENTFLOW_USAGE_DB_PATH: /app/data/agentflow_api_usage.duckdb
AGENTFLOW_WEBHOOKS_FILE: /app/data/e2e-webhooks.yaml
# The e2e webhook callback is delivered to the host gateway, which the
# SSRF egress guard rejects as a private address. Trust exactly that
# configured callback host (default host.docker.internal) — the guard
# stays fully active for every other target.
AGENTFLOW_EGRESS_ALLOWED_HOSTS: ${AGENTFLOW_E2E_CALLBACK_HOST:-host.docker.internal}
DUCKDB_PATH: /app/data/agentflow.duckdb
# E2E runs the shipped serving profile: config/serving.yaml selects
# ClickHouse, and these point the backend at the in-stack server.
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_PORT: 8123
CLICKHOUSE_DATABASE: agentflow
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: ""
REDIS_URL: redis://redis:6379/0
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
OTEL_SDK_DISABLED: "true"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- agentflow-api-data:/app/data
- ./config:/app/config:ro
- ./contracts:/app/contracts:ro
healthcheck:
test:
- CMD
- python
- -c
- import urllib.request; urllib.request.urlopen("http://localhost:8000/v1/health", timeout=5)
interval: 10s
timeout: 10s
retries: 12
start_period: 15s
deploy:
resources:
limits:
cpus: "1.50"
memory: 2G
volumes:
agentflow-api-data: