mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
docs(deploy): simplify deployment guide and update docker compose
This commit is contained in:
+25
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user