mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
113 lines
2.4 KiB
YAML
113 lines
2.4 KiB
YAML
name: "memoh"
|
|
services:
|
|
postgres:
|
|
image: postgres:18.1-alpine
|
|
container_name: memoh-postgres
|
|
environment:
|
|
POSTGRES_DB: memoh
|
|
POSTGRES_USER: memoh
|
|
POSTGRES_PASSWORD: memoh123
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql
|
|
- ./db/migrations:/docker-entrypoint-initdb.d:ro
|
|
expose:
|
|
- "5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U memoh"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
networks:
|
|
- memoh-network
|
|
|
|
qdrant:
|
|
image: qdrant/qdrant:latest
|
|
container_name: memoh-qdrant
|
|
volumes:
|
|
- qdrant_data:/qdrant/storage
|
|
expose:
|
|
- "6333"
|
|
- "6334"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "timeout 10s bash -c ':> /dev/tcp/127.0.0.1/6333' || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
networks:
|
|
- memoh-network
|
|
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.server
|
|
container_name: memoh-server
|
|
pid: host
|
|
volumes:
|
|
- ./config.toml:/app/config.toml:ro
|
|
- /run/containerd/containerd.sock:/run/containerd/containerd.sock
|
|
- /var/lib/containerd:/var/lib/containerd
|
|
- server_cni_state:/var/lib/cni
|
|
- ${MEMOH_DATA_ROOT:-/opt/memoh/data}:${MEMOH_DATA_ROOT:-/opt/memoh/data}
|
|
cap_add:
|
|
- SYS_ADMIN
|
|
- NET_ADMIN
|
|
security_opt:
|
|
- seccomp:unconfined
|
|
- apparmor:unconfined
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
qdrant:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
networks:
|
|
- memoh-network
|
|
|
|
agent:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.agent
|
|
container_name: memoh-agent
|
|
volumes:
|
|
- ./config.toml:/config.toml:ro
|
|
ports:
|
|
- "8081:8081"
|
|
depends_on:
|
|
- server
|
|
restart: unless-stopped
|
|
networks:
|
|
- memoh-network
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.web
|
|
args:
|
|
- VITE_API_URL=http://localhost:8080
|
|
- VITE_AGENT_URL=http://localhost:8081
|
|
container_name: memoh-web
|
|
ports:
|
|
- "80:80"
|
|
depends_on:
|
|
- server
|
|
- agent
|
|
restart: unless-stopped
|
|
networks:
|
|
- memoh-network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
qdrant_data:
|
|
driver: local
|
|
server_cni_state:
|
|
driver: local
|
|
|
|
networks:
|
|
memoh-network:
|
|
driver: bridge
|