forked from felinics/Memoh
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
144 lines (137 loc) · 4.26 KB
/
Copy pathdocker-compose.yml
File metadata and controls
144 lines (137 loc) · 4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
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
# Required for SQLite: migrations must write to the same persistent
# database file later opened by the server container.
- memoh_data:/opt/memoh/data
depends_on:
postgres:
condition: service_healthy
restart: "no"
networks:
- memoh-network
server:
image: memohai/server:latest
container_name: memoh-server
privileged: true
pid: host
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
# Proxy: use host.docker.internal for localhost proxies, e.g.
# HTTP_PROXY=http://host.docker.internal:7890 docker compose up -d
HTTP_PROXY: "${HTTP_PROXY:-${http_proxy:-}}"
HTTPS_PROXY: "${HTTPS_PROXY:-${https_proxy:-}}"
NO_PROXY: "${NO_PROXY:-127.0.0.1,localhost},postgres,qdrant,sparse,server,web,migrate,memoh-postgres,memoh-qdrant,memoh-sparse,memoh-server,memoh-web,memoh-migrate"
http_proxy: "${http_proxy:-${HTTP_PROXY:-}}"
https_proxy: "${https_proxy:-${HTTPS_PROXY:-}}"
no_proxy: "${no_proxy:-${NO_PROXY:-127.0.0.1,localhost}},postgres,qdrant,sparse,server,web,migrate,memoh-postgres,memoh-qdrant,memoh-sparse,memoh-server,memoh-web,memoh-migrate"
MEMOH_DISPLAY_WEBRTC_UDP_PORT_MIN: "${MEMOH_DISPLAY_WEBRTC_UDP_PORT_MIN:-30000}"
MEMOH_DISPLAY_WEBRTC_UDP_PORT_MAX: "${MEMOH_DISPLAY_WEBRTC_UDP_PORT_MAX:-30100}"
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"
- "${MEMOH_DISPLAY_WEBRTC_UDP_PORT_MIN:-30000}-${MEMOH_DISPLAY_WEBRTC_UDP_PORT_MAX:-30100}:${MEMOH_DISPLAY_WEBRTC_UDP_PORT_MIN:-30000}-${MEMOH_DISPLAY_WEBRTC_UDP_PORT_MAX:-30100}/udp"
depends_on:
migrate:
condition: service_completed_successfully
restart: unless-stopped
networks:
- memoh-network
web:
image: memohai/web:latest
container_name: memoh-web
environment:
MEMOH_SERVER_UPSTREAM: ${MEMOH_SERVER_UPSTREAM:-memoh-server:8080}
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
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