-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
30 lines (29 loc) · 868 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
30 lines (29 loc) · 868 Bytes
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
services:
# Mock upstream API (weather service, no auth)
weather-api:
build: .
command: python -m uvicorn examples.mock_weather_server:app --host 0.0.0.0 --port 8000 --app-dir /app
ports:
- "18000:8000"
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health')\""]
interval: 5s
retries: 3
# x402 payment gateway (protects the weather API)
x402-gateway:
build: .
command: >
ag402-gateway
--target http://weather-api:8000
--price 0.02
--address DemoRecipientWa11et11111111111111111111
--host 0.0.0.0
--port 8001
ports:
- "18001:8001"
depends_on:
weather-api:
condition: service_healthy
environment:
- X402_MODE=test
- AG402_UNLOCK_PASSWORD=${AG402_UNLOCK_PASSWORD:-}