Files
Memoh/devenv/docker-compose.yml
T
晨苒 627b673a5c refactor: multi-provider memory adapters with scan-based builtin (#227)
* refactor: restructure memory into multi-provider adapters, remove manifest.json dependency

- Rename internal/memory/provider to internal/memory/adapters with per-provider subdirectories (builtin, mem0, openviking)
- Replace manifest.json-based delete/update with scan-based index from daily files
- Add mem0 and openviking provider adapters with HTTP client, chat hooks, MCP tools, and CRUD
- Wire provider lifecycle into registry (auto-instantiate on create, evict on update/delete)
- Split docker-compose into base stack + optional overlays (qdrant, browser, mem0, openviking)
- Update admin UI to support dynamic provider config schema rendering

* chore(lint): fix all golangci-lint issues for clean CI

* refactor(docker): replace compose overlay files with profiles

* feat(memory): add built-in memory multi modes

* fix(ci): golangci lint

* feat(memory): edit built-in memory sparse design
2026-03-14 06:04:13 +08:00

193 lines
4.6 KiB
YAML

name: "memoh-dev"
services:
postgres:
image: postgres:18-alpine
container_name: memoh-dev-postgres
environment:
POSTGRES_DB: memoh
POSTGRES_USER: memoh
POSTGRES_PASSWORD: memoh123
volumes:
- postgres_data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U memoh"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
qdrant:
image: qdrant/qdrant:latest
container_name: memoh-dev-qdrant
volumes:
- qdrant_data:/qdrant/storage
ports:
- "6333:6333"
- "6334:6334"
healthcheck:
test: ["CMD-SHELL", "timeout 5s bash -c ':> /dev/tcp/127.0.0.1/6333' || exit 1"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
deps:
build:
context: ..
dockerfile: devenv/Dockerfile.web
container_name: memoh-dev-deps
working_dir: /workspace
command: ["pnpm", "install"]
volumes:
- ..:/workspace
- node_modules:/workspace/node_modules
- pnpm_store:/root/.local/share/pnpm/store
restart: "no"
migrate:
build:
context: ..
dockerfile: devenv/Dockerfile.server
container_name: memoh-dev-migrate
working_dir: /workspace
entrypoint: []
command: ["go", "run", "./cmd/agent/main.go", "migrate", "up"]
environment:
CONFIG_PATH: /workspace/devenv/app.dev.toml
volumes:
- ..:/workspace
- go_mod_cache:/go/pkg/mod
- go_build_cache:/root/.cache/go-build
depends_on:
postgres:
condition: service_healthy
qdrant:
condition: service_healthy
restart: "no"
server:
build:
context: ..
dockerfile: devenv/Dockerfile.server
container_name: memoh-dev-server
working_dir: /workspace
privileged: true
pid: host
command: ["air", "-c", ".air.toml"]
environment:
CONFIG_PATH: /workspace/devenv/app.dev.toml
volumes:
- ..:/workspace
- go_mod_cache:/go/pkg/mod
- go_build_cache:/root/.cache/go-build
- containerd_data:/var/lib/containerd
- server_cni_state:/var/lib/cni
- memoh_data:/opt/memoh/data
- /etc/localtime:/etc/localtime:ro
ports:
- "8080:8080"
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://127.0.0.1:8080/health || exit 1"]
interval: 5s
timeout: 3s
retries: 20
depends_on:
migrate:
condition: service_completed_successfully
qdrant:
condition: service_healthy
restart: unless-stopped
agent:
image: oven/bun:1-alpine
container_name: memoh-dev-agent
working_dir: /workspace/apps/agent
command: ["bun", "run", "--watch", "src/index.ts"]
volumes:
- ..:/workspace
- node_modules:/workspace/node_modules
ports:
- "8081:8081"
depends_on:
deps:
condition: service_completed_successfully
server:
condition: service_healthy
restart: unless-stopped
web:
build:
context: ..
dockerfile: devenv/Dockerfile.web
container_name: memoh-dev-web
working_dir: /workspace/apps/web
command: ["pnpm", "dev"]
volumes:
- ..:/workspace
- node_modules:/workspace/node_modules
ports:
- "8082:8082"
depends_on:
deps:
condition: service_completed_successfully
server:
condition: service_healthy
restart: unless-stopped
browser:
build:
context: ..
dockerfile: devenv/Dockerfile.browser
container_name: memoh-dev-browser
working_dir: /workspace/apps/browser
command: ["bun", "run", "--watch", "src/index.ts"]
volumes:
- ..:/workspace
- node_modules:/workspace/node_modules
ports:
- "8083:8083"
depends_on:
deps:
condition: service_completed_successfully
server:
condition: service_healthy
restart: unless-stopped
sparse:
build:
context: ..
dockerfile: docker/Dockerfile.sparse
container_name: memoh-dev-sparse
ports:
- "8085:8085"
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8085/health')\" || exit 1"]
interval: 15s
timeout: 10s
start_period: 30s
retries: 3
restart: unless-stopped
volumes:
postgres_data:
driver: local
qdrant_data:
driver: local
go_mod_cache:
driver: local
go_build_cache:
driver: local
containerd_data:
driver: local
memoh_data:
driver: local
server_cni_state:
driver: local
node_modules:
driver: local
pnpm_store:
driver: local