docs(deploy): simplify deployment guide and update docker compose

This commit is contained in:
zenhouke
2026-02-12 15:32:41 +08:00
parent 01cb6c85db
commit 86d53818a8
2 changed files with 56 additions and 365 deletions
+25 -4
View File
@@ -49,7 +49,7 @@ services:
- /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}
- /app/data:/app/data
cap_add:
- SYS_ADMIN
- NET_ADMIN
@@ -58,6 +58,12 @@ services:
- apparmor:unconfined
ports:
- "8080:8080"
healthcheck:
test: ["CMD-SHELL", "netstat -tln | grep :8080 || exit 1 "]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
depends_on:
postgres:
condition: service_healthy
@@ -76,8 +82,15 @@ services:
- ./config.toml:/config.toml:ro
ports:
- "8081:8081"
healthcheck:
test: ["CMD-SHELL", "netstat -tln | grep :8081 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
depends_on:
- server
server:
condition: service_healthy
restart: unless-stopped
networks:
- memoh-network
@@ -92,9 +105,17 @@ services:
container_name: memoh-web
ports:
- "80:80"
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:80 || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
depends_on:
- server
- agent
server:
condition: service_healthy
agent:
condition: service_healthy
restart: unless-stopped
networks:
- memoh-network