-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (96 loc) · 3.56 KB
/
docker-compose.yml
File metadata and controls
101 lines (96 loc) · 3.56 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
version: "3.9"
# =============================================================================
# Po_core Docker Compose
# =============================================================================
#
# Quick start:
# cp .env.example .env # set PO_SKIP_AUTH/PO_API_KEY for your env
# docker compose up # starts API server on :8000
#
# With optional tracing DB:
# docker compose --profile db up
#
# Docs:
# http://localhost:8000/docs # Swagger UI
# http://localhost:8000/redoc # ReDoc
# =============================================================================
services:
# ---------------------------------------------------------------------------
# Po_core REST API
# ---------------------------------------------------------------------------
api:
build:
context: .
dockerfile: Dockerfile
target: runtime
image: po-core:latest
container_name: po_core_api
ports:
- "${PO_PORT:-8000}:${PO_PORT:-8000}"
environment:
- PO_HOST=0.0.0.0
- PO_PORT=${PO_PORT:-8000}
- PO_WORKERS=${PO_WORKERS:-1}
- PO_LOG_LEVEL=${PO_LOG_LEVEL:-info}
- PO_API_KEY=${PO_API_KEY:-}
- PO_SKIP_AUTH=${PO_SKIP_AUTH:-false}
- PO_WS_ALLOW_QUERY_API_KEY=${PO_WS_ALLOW_QUERY_API_KEY:-false}
- PO_CORS_ORIGINS=${PO_CORS_ORIGINS:-*}
- PO_RATE_LIMIT_PER_MINUTE=${PO_RATE_LIMIT_PER_MINUTE:-60}
- PO_TRUST_PROXY_HEADERS=${PO_TRUST_PROXY_HEADERS:-false}
- PO_ENABLE_SOLARWILL=${PO_ENABLE_SOLARWILL:-true}
- PO_ENABLE_INTENTION_GATE=${PO_ENABLE_INTENTION_GATE:-true}
- PO_ENABLE_ACTION_GATE=${PO_ENABLE_ACTION_GATE:-true}
- PO_ENABLE_PARETO_SHADOW=${PO_ENABLE_PARETO_SHADOW:-false}
- PO_FREEDOM_PRESSURE_V2=${PO_FREEDOM_PRESSURE_V2:-false}
- PO_DELIBERATION_MAX_ROUNDS=${PO_DELIBERATION_MAX_ROUNDS:-2}
- PO_ROLES=${PO_ROLES:-}
- PO_PHILOSOPHERS_MAX_NORMAL=${PO_PHILOSOPHERS_MAX_NORMAL:-39}
- PO_PHILOSOPHERS_MAX_WARN=${PO_PHILOSOPHERS_MAX_WARN:-5}
- PO_PHILOSOPHERS_MAX_CRITICAL=${PO_PHILOSOPHERS_MAX_CRITICAL:-1}
- PO_PHILOSOPHER_COST_BUDGET_NORMAL=${PO_PHILOSOPHER_COST_BUDGET_NORMAL:-80}
- PO_PHILOSOPHER_COST_BUDGET_WARN=${PO_PHILOSOPHER_COST_BUDGET_WARN:-12}
- PO_PHILOSOPHER_COST_BUDGET_CRITICAL=${PO_PHILOSOPHER_COST_BUDGET_CRITICAL:-3}
- PO_LLM_ENABLED=${PO_LLM_ENABLED:-false}
- PO_LLM_PROVIDER=${PO_LLM_PROVIDER:-gemini}
- PO_LLM_MODEL=${PO_LLM_MODEL:-}
- PO_LLM_TIMEOUT=${PO_LLM_TIMEOUT:-10.0}
- PO_MAX_TRACE_SESSIONS=${PO_MAX_TRACE_SESSIONS:-1000}
volumes:
- po_core_state:/app/.po_core
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:${PO_PORT:-8000}/v1/health')",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
networks:
- po_net
# ---------------------------------------------------------------------------
# Optional: SQLite-backed trace persistence (profile: db)
# ---------------------------------------------------------------------------
# Uncomment and extend for PostgreSQL or Redis when scaling beyond 1 process.
# db:
# image: postgres:16-alpine
# profiles: [db]
# environment:
# POSTGRES_DB: po_core
# POSTGRES_USER: po
# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
# volumes:
# - pg_data:/var/lib/postgresql/data
# networks:
# - po_net
volumes:
po_core_state:
# pg_data:
networks:
po_net:
driver: bridge