소스 검색

add nginx

ZhongPengQun 1 주 전
부모
커밋
738d26f793

+ 0 - 0
nginx/README.md


+ 32 - 0
nginx/conf.d/api.internationale.9981.tech.conf.bak

@@ -0,0 +1,32 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name api.internationale.9981.tech;
+
+    client_max_body_size 1024m;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/api_internationale_access.log;  # 访问日志路径
+    error_log /var/log/nginx/api_internationale_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.3:5000;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	proxy_pass http://api-internationale:8000;  # 替换为你的 8090 服务容器名
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 17 - 0
nginx/conf.d/default.conf

@@ -0,0 +1,17 @@
+server {
+    listen 80;  # 监听 80 端口(HTTP)
+    server_name 9981.tech;  # 可替换为你的域名(如 yourdomain.com)
+    
+    # 网站根目录(对应容器内路径,已通过 volume 挂载到宿主机 ./html)
+    root /usr/share/nginx/html;
+    index index.html index.htm;  # 默认首页
+    
+    # 日志配置(对应容器内路径,已挂载到宿主机 ./logs)
+    access_log /var/log/nginx/default-access.log;  # 访问日志
+    error_log /var/log/nginx/default-error.log;    # 错误日志
+
+    # 可选:静态文件缓存配置(优化性能)
+    location ~* \.(jpg|jpeg|png|gif|css|js)$ {
+        expires 30d;  # 静态文件缓存 30 天
+    }
+}

+ 28 - 0
nginx/conf.d/download.9981.tech.conf

@@ -0,0 +1,28 @@
+server {
+	listen 80;
+	server_name download.9981.tech;  # 任意IP/域名访问
+
+	root /usr/share/nginx/html/download;
+	index index.html;
+
+	location / {
+		autoindex on;
+		autoindex_exact_size off;
+		autoindex_localtime on;
+		autoindex_format html;
+
+		add_header Accept-Ranges bytes;
+
+		expires 1d;
+		add_header Cache-Control "public, max-age=86400";
+
+		sendfile on;
+		tcp_nopush on;
+		tcp_nodelay off;
+
+		# 仅允许下载(禁止上传/修改)
+		limit_except GET HEAD {
+			deny all;
+		}
+	}
+}

+ 30 - 0
nginx/conf.d/frps-admin.9981.tech.conf.bak

@@ -0,0 +1,30 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name frps-admin.9981.tech;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/frp_admin_access.log;  # 访问日志路径
+    error_log /var/log/nginx/frp_admin_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.5:7500;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	proxy_pass http://frps:7500;  # 替换为你的 8090 服务容器名
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 30 - 0
nginx/conf.d/frps.9981.tech.conf.bak

@@ -0,0 +1,30 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name frps.9981.tech;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/frp_access.log;  # 访问日志路径
+    error_log /var/log/nginx/frp_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.5:7500;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	proxy_pass http://frps:7000;  # 替换为你的 8090 服务容器名
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 33 - 0
nginx/conf.d/gogs.9981.tech.conf

@@ -0,0 +1,33 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name gogs.9981.tech;
+
+    client_max_body_size 1024m;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/gogs_access.log;  # 访问日志路径
+    error_log /var/log/nginx/gogs_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.4:3000;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	#proxy_pass http://gogs:3000;  # 替换为你的 8090 服务容器名
+        proxy_pass http://101.201.78.54:10880;
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 32 - 0
nginx/conf.d/goproxy-admin.9981.tech.conf.bak

@@ -0,0 +1,32 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name goproxy-admin.9981.tech;
+
+    client_max_body_size 1024m;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/goproxy_admin_access.log;  # 访问日志路径
+    error_log /var/log/nginx/goproxy_admin_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.3:5000;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	proxy_pass http://goproxy:8081;  # 替换为你的 8090 服务容器名
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 31 - 0
nginx/conf.d/kanboard.9981.tech.conf

@@ -0,0 +1,31 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name kanboard.9981.tech;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/kanboard_access.log;  # 访问日志路径
+    error_log /var/log/nginx/kanboard_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.2:80;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	#proxy_pass http://kanboard_default:80;  # 替换为你的 8090 服务容器名
+        proxy_pass http://101.201.78.54:8090;
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 31 - 0
nginx/conf.d/lister.9981.tech.conf

@@ -0,0 +1,31 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name lister.9981.tech;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/lister_access.log;  # 访问日志路径
+    error_log /var/log/nginx/lister_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.2:80;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	#proxy_pass http://kanboard_default:80;  # 替换为你的 8090 服务容器名
+        proxy_pass http://101.201.78.54:3000;
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 33 - 0
nginx/conf.d/mkdocs.9981.tech.conf

@@ -0,0 +1,33 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name mkdocs.9981.tech;
+
+    client_max_body_size 1024m;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/mkdocs_access.log;  # 访问日志路径
+    error_log /var/log/nginx/mkdocs_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.4:3000;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	#proxy_pass http://gogs:3000;  # 替换为你的 8090 服务容器名
+        proxy_pass http://101.201.78.54:28000;
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 32 - 0
nginx/conf.d/registry-browser.9981.tech.conf

@@ -0,0 +1,32 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name registry-browser.9981.tech;
+
+    client_max_body_size 1024m;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/registry_b_access.log;  # 访问日志路径
+    error_log /var/log/nginx/registry_b_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.7:8080;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	proxy_pass http://registry-browser:8080;  # 替换为你的 8090 服务容器名
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 32 - 0
nginx/conf.d/registry.9981.tech.conf

@@ -0,0 +1,32 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name registry.9981.tech;
+
+    client_max_body_size 1024m;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/registry_access.log;  # 访问日志路径
+    error_log /var/log/nginx/registry_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.3:5000;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	proxy_pass http://my-docker-registry:5000;  # 替换为你的 8090 服务容器名
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 34 - 0
nginx/conf.d/vscode.9981.tech.conf

@@ -0,0 +1,34 @@
+# 配置 kanboard.9981.tech 域名的反向代理
+server {
+    # 监听 80 端口(HTTP 默认端口,域名访问无需带端口)
+    listen 80;
+    # 绑定你的域名(精确匹配,确保只有该域名触发此配置)
+    server_name vscode.9981.tech;
+
+    client_max_body_size 1024m;
+
+    # 日志配置(可选但推荐,便于排查问题)
+    access_log /var/log/nginx/vscode_access.log;  # 访问日志路径
+    error_log /var/log/nginx/vscode_error.log;    # 错误日志路径
+
+    # 核心:将所有请求转发到 8090 端口
+    location / {
+        # 转发目标:填写服务的实际地址(分 2 种场景,二选一!)
+        # 场景 1:8090 服务运行在宿主机(非 Docker 容器)→ 用宿主机内网 IP
+	#proxy_pass http://172.19.0.4:3000;  # x 是 Docker 默认的宿主机内网 IP
+        # 场景 2:8090 服务运行在其他 Docker 容器→ 用容器名或容器内网 IP
+	#proxy_pass http://vscode-web-ide:8080;  # 替换为你的 8090 服务容器名
+        proxy_pass http://101.201.78.54:8181;
+
+
+        # 必须添加的代理头(确保后端服务能正确识别客户端信息)
+        proxy_set_header Host $host;                  # 传递域名到后端
+        proxy_set_header X-Real-IP $remote_addr;      # 传递客户端真实 IP
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 传递代理链 IP
+        proxy_set_header X-Forwarded-Proto $scheme;   # 传递协议(HTTP/HTTPS)
+
+        # 可选:超时配置(避免长连接断开)
+        proxy_connect_timeout 60s;
+        proxy_read_timeout 60s;
+    }
+}

+ 28 - 0
nginx/docker-compose.yml

@@ -0,0 +1,28 @@
+version: '3.8'  # 1.29.2 完全支持 3.x 版本语法,兼容性稳定
+
+services:
+  nginx:
+    image: registry.cn-hangzhou.aliyuncs.com/zhongpengqun/wanderer:linux-amd64-nginx-1.28.0
+    container_name: nginx  # 自定义容器名,便于管理
+    restart: always  # 容器意外退出时自动重启(适合生产环境)
+    ports:
+      - "80:80"   # 映射 HTTP 端口(宿主机端口:容器内端口)
+      - "443:443" # 映射 HTTPS 端口(如需配置 SSL,保留此条)
+    volumes:
+      # 挂载配置文件:宿主机 ./conf.d 对应容器内 /etc/nginx/conf.d
+      - ./conf.d:/etc/nginx/conf.d
+      # 挂载 SSL 证书:如需 HTTPS,将证书放在 ./ssl 目录
+      - ./ssl:/etc/nginx/ssl
+      # 挂载静态文件:宿主机 ./html 对应容器内默认网站根目录
+      - ./html:/usr/share/nginx/html
+      # 挂载日志:宿主机 ./logs 保存 Nginx 访问/错误日志
+      - ./logs:/var/log/nginx
+    environment:
+      - TZ=Asia/Shanghai  # 设置容器时区为上海(避免日志时间偏差)
+    networks:
+      - 9981_tech_network  # 假设 Kanboard 在这个网络,后续会验证
+
+# 定义网络(桥接模式,默认即可)
+networks:
+  9981_tech_network:  # 声明使用外部已存在的kanboard_default网络
+    external: true

+ 31 - 0
nginx/docker-compose.yml.bak

@@ -0,0 +1,31 @@
+version: '3.8'  # 1.29.2 完全支持 3.x 版本语法,兼容性稳定
+
+services:
+  nginx:
+    image: registry.cn-hangzhou.aliyuncs.com/zhongpengqun/wanderer:linux-amd64-nginx-1.28.0
+    container_name: nginx  # 自定义容器名,便于管理
+    restart: always  # 容器意外退出时自动重启(适合生产环境)
+    ports:
+      - "80:80"   # 映射 HTTP 端口(宿主机端口:容器内端口)
+      - "443:443" # 映射 HTTPS 端口(如需配置 SSL,保留此条)
+    volumes:
+      # 挂载配置文件:宿主机 ./conf.d 对应容器内 /etc/nginx/conf.d
+      - ./conf.d:/etc/nginx/conf.d
+      # 挂载 SSL 证书:如需 HTTPS,将证书放在 ./ssl 目录
+      - ./ssl:/etc/nginx/ssl
+      # 挂载静态文件:宿主机 ./html 对应容器内默认网站根目录
+      - ./html:/usr/share/nginx/html
+      # 挂载日志:宿主机 ./logs 保存 Nginx 访问/错误日志
+      - ./logs:/var/log/nginx
+    environment:
+      - TZ=Asia/Shanghai  # 设置容器时区为上海(避免日志时间偏差)
+    networks:
+      - nginx-network  # 自定义网络,后续若加其他服务(如后端)可复用
+      - 9981_tech_network  # 假设 Kanboard 在这个网络,后续会验证
+
+# 定义网络(桥接模式,默认即可)
+networks:
+  nginx-network:
+    driver: bridge
+  9981_tech_network:  # 声明使用外部已存在的kanboard_default网络
+    external: false