mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
142 lines
3.3 KiB
YAML
142 lines
3.3 KiB
YAML
name: "memoh"
|
|
services:
|
|
postgres:
|
|
image: postgres:18-alpine
|
|
container_name: memoh-postgres
|
|
environment:
|
|
POSTGRES_DB: memoh
|
|
POSTGRES_USER: memoh
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-memoh123}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql
|
|
- /etc/localtime:/etc/localtime:ro
|
|
expose:
|
|
- "5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U memoh"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
networks:
|
|
- memoh-network
|
|
|
|
migrate:
|
|
image: memohai/server:latest
|
|
container_name: memoh-migrate
|
|
entrypoint: ["/app/memoh-server", "migrate", "up"]
|
|
volumes:
|
|
- ${MEMOH_CONFIG:-./config.toml}:/app/config.toml:ro
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: "no"
|
|
networks:
|
|
- memoh-network
|
|
|
|
server:
|
|
image: memohai/server:latest
|
|
container_name: memoh-server
|
|
privileged: true
|
|
pid: host
|
|
volumes:
|
|
- ${MEMOH_CONFIG:-./config.toml}:/app/config.toml:ro
|
|
- ./conf/providers:/app/conf/providers:ro
|
|
- containerd_data:/var/lib/containerd
|
|
- server_cni_state:/var/lib/cni
|
|
- memoh_data:/opt/memoh/data
|
|
# Expose host CDI specs to the nested containerd used for bot workspaces.
|
|
- /etc/cdi:/etc/cdi:ro
|
|
- /var/run/cdi:/var/run/cdi:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "8080:8080"
|
|
- "1455:8080"
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
restart: unless-stopped
|
|
networks:
|
|
- memoh-network
|
|
|
|
web:
|
|
image: memohai/web:latest
|
|
container_name: memoh-web
|
|
ports:
|
|
- "8082:8082"
|
|
depends_on:
|
|
- server
|
|
restart: unless-stopped
|
|
networks:
|
|
- memoh-network
|
|
|
|
sparse:
|
|
image: memohai/sparse:latest
|
|
container_name: memoh-sparse
|
|
profiles: [sparse]
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
expose:
|
|
- "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
|
|
networks:
|
|
- memoh-network
|
|
|
|
qdrant:
|
|
image: qdrant/qdrant:latest
|
|
container_name: memoh-qdrant
|
|
profiles: [qdrant, sparse]
|
|
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
|
|
|
|
browser:
|
|
image: memohai/browser:${BROWSER_TAG:-local}
|
|
container_name: memoh-browser
|
|
profiles: [browser]
|
|
environment:
|
|
- BROWSER_CORES=${BROWSER_CORES:-chromium,firefox}
|
|
volumes:
|
|
- ${MEMOH_CONFIG:-./config.toml}:/config.toml:ro
|
|
ports:
|
|
- "8083:8083"
|
|
depends_on:
|
|
- server
|
|
restart: unless-stopped
|
|
networks:
|
|
- memoh-network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
containerd_data:
|
|
driver: local
|
|
memoh_data:
|
|
driver: local
|
|
server_cni_state:
|
|
driver: local
|
|
qdrant_data:
|
|
driver: local
|
|
openviking_data:
|
|
driver: local
|
|
|
|
networks:
|
|
memoh-network:
|
|
driver: bridge
|