mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-06-17 21:50:15 +08:00
Compare commits
5 Commits
release/2.
...
hotfix/doc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3002e311ac | ||
|
|
ad57bc5489 | ||
|
|
a7d8995f3a | ||
|
|
16a0dd4aec | ||
|
|
39d051cc36 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "BiliNote",
|
||||
"version": "2.4.1",
|
||||
"version": "2.4.2",
|
||||
"identifier": "com.jefferyhuang.bilinote",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
本项目所有重要变更记录于此。格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
||||
|
||||
## [2.4.2] - 2026-06-17
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Docker 部署打开显示 nginx 欢迎页**:`nginx/default.conf` 被 docker-compose(多容器)与 `Dockerfile.complete`(单镜像)共用,但两种模式对 `location /` 的需求相反(多容器需反代独立的 frontend 容器,单镜像需直接服务本地静态文件),导致其中一种部署方式总会回退到 nginx 默认欢迎页。现拆分为两份配置:`nginx/default.conf`(compose,反代 frontend 容器)与新增的 `nginx/standalone.conf`(单镜像,静态前端 + 本地 backend 代理);`Dockerfile.complete` 改用后者并删除 Debian 默认站点,两种部署方式均恢复正常。
|
||||
|
||||
## [2.4.1] - 2026-06-17
|
||||
|
||||
### Added
|
||||
|
||||
@@ -90,9 +90,11 @@ WORKDIR /app/backend
|
||||
# 复制前端静态文件到 nginx
|
||||
COPY --from=frontend-builder /tmp/frontend/dist /usr/share/nginx/html
|
||||
|
||||
# 配置 nginx
|
||||
# 配置 nginx(单镜像版:前端静态文件 + 本地 backend 代理,见 nginx/standalone.conf)
|
||||
RUN rm -rf /etc/nginx/conf.d/default.conf
|
||||
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
# 删除默认 nginx site,防止 default_server 劫持 80 端口
|
||||
RUN rm -f /etc/nginx/sites-enabled/default
|
||||
COPY ./nginx/standalone.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 创建 supervisor 配置
|
||||
# 关键点:supervisord 默认 *不* 把自己的环境变量传给子进程。
|
||||
@@ -127,9 +129,7 @@ priority=20
|
||||
environment=BACKEND_PORT="%(ENV_BACKEND_PORT)s",BACKEND_HOST="%(ENV_BACKEND_HOST)s",TRANSCRIBER_TYPE="%(ENV_TRANSCRIBER_TYPE)s",WHISPER_MODEL_SIZE="%(ENV_WHISPER_MODEL_SIZE)s",FFMPEG_BIN_PATH="%(ENV_FFMPEG_BIN_PATH)s",HF_ENDPOINT="%(ENV_HF_ENDPOINT)s",STATIC="%(ENV_STATIC)s",OUT_DIR="%(ENV_OUT_DIR)s",DATA_DIR="%(ENV_DATA_DIR)s",NOTE_OUTPUT_DIR="%(ENV_NOTE_OUTPUT_DIR)s",DATABASE_URL="%(ENV_DATABASE_URL)s",IMAGE_BASE_URL="%(ENV_IMAGE_BASE_URL)s",ENV="%(ENV_ENV)s",GROQ_TRANSCRIBER_MODEL="%(ENV_GROQ_TRANSCRIBER_MODEL)s"
|
||||
EOF
|
||||
|
||||
# 修改 nginx 配置以使用本地 backend
|
||||
RUN sed -i 's/proxy_pass http:\/\/backend:8483/proxy_pass http:\/\/127.0.0.1:8483/g' /etc/nginx/conf.d/default.conf && \
|
||||
sed -i 's/proxy_pass http:\/\/frontend:80/proxy_pass http:\/\/127.0.0.1:8080/g' /etc/nginx/conf.d/default.conf
|
||||
# nginx/standalone.conf 已直接写好本地 backend(127.0.0.1:8483)与前端静态服务,无需再 sed 改写。
|
||||
|
||||
# 启动 supervisor
|
||||
# 推荐启动方式(覆盖默认 env):
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<p align="center">
|
||||
<img src="./doc/icon.svg" alt="BiliNote Banner" width="50" height="50" />
|
||||
</p>
|
||||
<h1 align="center" > BiliNote v2.4.1</h1>
|
||||
<h1 align="center" > BiliNote v2.4.2</h1>
|
||||
</div>
|
||||
|
||||
<p align="center"><i>AI 视频笔记生成工具 让 AI 为你的视频做笔记</i></p>
|
||||
|
||||
@@ -2,19 +2,18 @@ server {
|
||||
listen 80;
|
||||
client_max_body_size 10G;
|
||||
|
||||
# gzip 压缩
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
||||
|
||||
# 所有非 /api 请求全部代理给 frontend 容器
|
||||
# 多容器(docker-compose)部署:前端在独立的 frontend 容器,代理过去。
|
||||
# 单镜像(Dockerfile.complete)部署请勿用本文件,改用 nginx/standalone.conf。
|
||||
location / {
|
||||
proxy_pass http://frontend:80;
|
||||
}
|
||||
|
||||
# 所有 /api 请求代理给 backend 容器
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8483;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
41
nginx/standalone.conf
Normal file
41
nginx/standalone.conf
Normal file
@@ -0,0 +1,41 @@
|
||||
# 单镜像(Dockerfile.complete / 一体化部署)专用 nginx 配置。
|
||||
#
|
||||
# 与 nginx/default.conf(docker-compose 多容器版)的关键区别:
|
||||
# - 前端不再由独立的 frontend 容器提供,构建产物已直接 COPY 到本镜像的
|
||||
# /usr/share/nginx/html,所以 location / 走【静态文件】而非反代 frontend;
|
||||
# - backend 与 nginx 同处一个容器,所以 /api、/static 代理到 127.0.0.1:8483。
|
||||
#
|
||||
# 注意:请勿把本文件的 location / 改成代理 frontend,否则单镜像里没有 frontend
|
||||
# 服务,会回退到 nginx 默认欢迎页。多容器(compose)请改 nginx/default.conf。
|
||||
server {
|
||||
listen 80;
|
||||
client_max_body_size 10G;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
||||
|
||||
# 前端静态文件由本容器直接服务(构建产物已 COPY 到此目录)
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# backend 与 nginx 同容器,代理到本地
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8483;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
proxy_pass http://127.0.0.1:8483/static/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
expires 7d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user