feat(05-04): split prod and fullstack compose artifacts
- add bot-only production compose contract - add health-gated internal fullstack harness
This commit is contained in:
parent
ae37476ddf
commit
df6d8bf628
3 changed files with 79 additions and 4 deletions
13
.env.example
13
.env.example
|
|
@ -8,11 +8,16 @@ MATRIX_PASSWORD=your_password_here
|
|||
MATRIX_PLATFORM_BACKEND=real
|
||||
MATRIX_AGENT_REGISTRY_PATH=config/matrix-agents.yaml
|
||||
|
||||
# Shared workspace contract
|
||||
SURFACES_WORKSPACE_DIR=/workspace
|
||||
# Shared /agents contract for Phase 05 deployment
|
||||
SURFACES_WORKSPACE_DIR=/agents
|
||||
SURFACES_SHARED_VOLUME=surfaces-agents
|
||||
|
||||
# Compose-local platform-agent route
|
||||
AGENT_BASE_URL=http://platform-agent:8000
|
||||
# Production handoff: point the bot at the externally managed agent endpoint.
|
||||
AGENT_BASE_URL=https://lambda.coredump.ru/agent_0/
|
||||
|
||||
# Internal full-stack compose defaults
|
||||
AGENT_ID=matrix-dev
|
||||
COMPOSIO_API_KEY=
|
||||
|
||||
# platform-agent provider
|
||||
PROVIDER_MODEL=openai/gpt-4o-mini
|
||||
|
|
|
|||
49
docker-compose.fullstack.yml
Normal file
49
docker-compose.fullstack.yml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
services:
|
||||
matrix-bot:
|
||||
extends:
|
||||
file: docker-compose.prod.yml
|
||||
service: matrix-bot
|
||||
environment:
|
||||
AGENT_BASE_URL: http://platform-agent:8000
|
||||
depends_on:
|
||||
platform-agent:
|
||||
condition: service_healthy
|
||||
|
||||
platform-agent:
|
||||
build:
|
||||
context: ./external/platform-agent
|
||||
target: development
|
||||
additional_contexts:
|
||||
agent_api: ./external/platform-agent_api
|
||||
environment:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
AGENT_ID: ${AGENT_ID:-matrix-dev}
|
||||
PROVIDER_MODEL: ${PROVIDER_MODEL:-openai/gpt-4o-mini}
|
||||
PROVIDER_URL: ${PROVIDER_URL:-}
|
||||
PROVIDER_API_KEY: ${PROVIDER_API_KEY:-}
|
||||
COMPOSIO_API_KEY: ${COMPOSIO_API_KEY:-}
|
||||
volumes:
|
||||
- ./external/platform-agent/src:/app/src
|
||||
- ./external/platform-agent_api:/agent_api
|
||||
- agents:/workspace
|
||||
command: >
|
||||
sh -lc "
|
||||
mkdir -p /workspace &&
|
||||
chown -R agent:agent /workspace &&
|
||||
exec /app/.venv/bin/uvicorn src.main:app --host 0.0.0.0 --port 8000
|
||||
"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/openapi.json', timeout=2).read()"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
agents:
|
||||
name: ${SURFACES_SHARED_VOLUME:-surfaces-agents}
|
||||
21
docker-compose.prod.yml
Normal file
21
docker-compose.prod.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
services:
|
||||
matrix-bot:
|
||||
build: .
|
||||
environment:
|
||||
MATRIX_HOMESERVER: ${MATRIX_HOMESERVER:-}
|
||||
MATRIX_USER_ID: ${MATRIX_USER_ID:-}
|
||||
MATRIX_PASSWORD: ${MATRIX_PASSWORD:-}
|
||||
MATRIX_ACCESS_TOKEN: ${MATRIX_ACCESS_TOKEN:-}
|
||||
MATRIX_PLATFORM_BACKEND: ${MATRIX_PLATFORM_BACKEND:-real}
|
||||
MATRIX_AGENT_REGISTRY_PATH: ${MATRIX_AGENT_REGISTRY_PATH:-config/matrix-agents.yaml}
|
||||
AGENT_BASE_URL: ${AGENT_BASE_URL:-}
|
||||
SURFACES_WORKSPACE_DIR: ${SURFACES_WORKSPACE_DIR:-/agents}
|
||||
PYTHONUNBUFFERED: "1"
|
||||
volumes:
|
||||
- agents:/agents
|
||||
- ./config:/app/config:ro
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
agents:
|
||||
name: ${SURFACES_SHARED_VOLUME:-surfaces-agents}
|
||||
Loading…
Add table
Add a link
Reference in a new issue