48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
|
|
# VM 5704 — Memory/State: Postgres + Redis
|
||
|
|
# Copy to /opt/ai/state/ and run: docker compose up -d
|
||
|
|
# See: docs/02-architecture/AI_AGENTS_57XX_DEPLOYMENT_PLAN.md Appendix B
|
||
|
|
|
||
|
|
services:
|
||
|
|
postgres:
|
||
|
|
image: postgres:16
|
||
|
|
container_name: ai-state-postgres
|
||
|
|
environment:
|
||
|
|
POSTGRES_DB: ai
|
||
|
|
POSTGRES_USER: ai
|
||
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||
|
|
volumes:
|
||
|
|
- /opt/ai/state/data/postgres:/var/lib/postgresql/data
|
||
|
|
ports:
|
||
|
|
- "5432:5432"
|
||
|
|
restart: unless-stopped
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U ai -d ai"]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 10
|
||
|
|
|
||
|
|
redis:
|
||
|
|
image: redis:7
|
||
|
|
container_name: ai-state-redis
|
||
|
|
command: ["redis-server", "--appendonly", "yes", "--save", "60", "1"]
|
||
|
|
volumes:
|
||
|
|
- /opt/ai/state/data/redis:/data
|
||
|
|
ports:
|
||
|
|
- "6379:6379"
|
||
|
|
restart: unless-stopped
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "redis-cli", "PING"]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 3s
|
||
|
|
retries: 10
|
||
|
|
|
||
|
|
# Optional vector DB (uncomment if needed)
|
||
|
|
# qdrant:
|
||
|
|
# image: qdrant/qdrant:latest
|
||
|
|
# container_name: ai-state-qdrant
|
||
|
|
# volumes:
|
||
|
|
# - /opt/ai/state/data/qdrant:/qdrant/storage
|
||
|
|
# ports:
|
||
|
|
# - "6333:6333"
|
||
|
|
# restart: unless-stopped
|