mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
fix(deploy): many docker compose bug
This commit is contained in:
@@ -4,7 +4,7 @@ level = "info"
|
||||
format = "text"
|
||||
|
||||
[server]
|
||||
addr = ":8080"
|
||||
addr = "server:8080"
|
||||
|
||||
## Admin
|
||||
[admin]
|
||||
@@ -19,13 +19,13 @@ jwt_expires_in = "168h"
|
||||
|
||||
## Docker configuration
|
||||
[containerd]
|
||||
socket_path = "unix:///var/run/docker.sock"
|
||||
socket_path = "/run/containerd/containerd.sock"
|
||||
namespace = "default"
|
||||
|
||||
[mcp]
|
||||
busybox_image = "memoh-mcp:latest"
|
||||
busybox_image = "docker.io/library/memoh-mcp:latest"
|
||||
snapshotter = "overlayfs"
|
||||
data_root = "/var/lib/memoh/data"
|
||||
data_root = "/opt/memoh/data"
|
||||
data_mount = "/data"
|
||||
|
||||
## Postgres configuration
|
||||
@@ -48,6 +48,7 @@ timeout_seconds = 10
|
||||
[agent_gateway]
|
||||
host = "agent"
|
||||
port = 8081
|
||||
server_addr = "server:8080"
|
||||
|
||||
[brave]
|
||||
api_key = ""
|
||||
|
||||
+27
-27
@@ -1,5 +1,6 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
@@ -15,40 +16,39 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# API 代理
|
||||
# Nginx 健康检查
|
||||
location = /health {
|
||||
access_log off;
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "ok\n";
|
||||
}
|
||||
|
||||
# 统一代理参数
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
|
||||
# Swagger 文档(保留 /api 前缀)
|
||||
location ~ ^/api/(docs(?:/.*)?|swagger\.json)$ {
|
||||
proxy_pass http://memoh-server:8080;
|
||||
}
|
||||
|
||||
# API 代理(其余 /api/* 去掉 /api 前缀转发)
|
||||
location /api/ {
|
||||
proxy_pass http://memoh-server:8080/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# 超时设置
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
|
||||
# Agent Gateway 代理
|
||||
location /agent/ {
|
||||
proxy_pass http://memoh-agent:8081/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# 超时设置
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
|
||||
# 静态资源缓存
|
||||
|
||||
Reference in New Issue
Block a user