Skip to content

Commit 5ff5852

Browse files
committed
update docs
1 parent ab82a73 commit 5ff5852

File tree

18 files changed

+1004
-918
lines changed

18 files changed

+1004
-918
lines changed

docs/.vuepress/components/Pricing.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ import { openSponsorLink } from "../data/sponsors";
103103
104104
.pricing-title {
105105
text-align: center;
106-
margin-bottom: 2.5rem;
106+
margin: 3rem 0 2rem;
107107
}
108108
109109
.pricing-cards {

docs/.vuepress/navbar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const myNavbar = defineNavbarConfig([
4444
]
4545
},
4646
{
47-
text: 'v1.4.1',
47+
text: 'v1.4.2',
4848
items: [
4949
{
5050
text: '线上演示',

docs/.vuepress/sidebar.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ export const mySidebar: ThemeSidebarMulti = {
100100
{ text: '介绍', link: 'intro' },
101101
{ text: '快速开始', link: 'quick-start' },
102102
]
103+
},
104+
{
105+
text: '部署',
106+
collapsed: false,
107+
items: [
108+
{ text: 'Docker', link: 'docker' },
109+
{ text: '传统', link: 'legacy' },
110+
]
103111
}
104112
]
105113
}

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ config:
99
text: 基于 FastAPI 框架,前后端分离,遵循「伪三层架构」设计,支持 Python 3.10+ 版本
1010
actions:
1111
- theme: brand
12-
text: 快速开始 ->
12+
text: 快速上手 ->
1313
link: /backend/summary/intro
1414
- theme: alt
1515
text: 伪三层架构?

docs/backend/deploy/Docker.md

Lines changed: 7 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ title: Docker 部署
1010

1111
本地部署是为了能够快捷的提供本地 API 服务
1212

13+
### 后端
14+
1315
:::: steps
1416

1517
1. env
@@ -71,6 +73,10 @@ title: Docker 部署
7173

7274
::::
7375

76+
### 前端
77+
78+
[点击跳转](../../frontend/quick-start.md)
79+
7480
## 服务器部署
7581

7682
::: tip
@@ -145,91 +151,7 @@ title: Docker 部署
145151

146152
### 前端
147153

148-
::::: steps
149-
150-
1. 拉取代码到服务器
151-
152-
```shell:no-line-numbers
153-
git clone https://github.com/fastapi-practices/fastapi_best_architecture_ui_arco.git
154-
```
155-
156-
2. env
157-
158-
修改 `.env.production` 中的 `VITE_API_BASE_URL` 为域名地址
159-
160-
3. 更新 nginx 配置
161-
162-
进入 deploy 目录,修改 `nginx.conf` 文件
163-
164-
@[code nginx :collapsed-lines=6](../../code/nginx.conf)
165-
166-
4. 更新脚本文件
167-
168-
::: warning
169-
如果你已通过后端 docker-compose 构建前端项目,此步骤和后面的剩余步骤直接跳过即可
170-
:::
171-
172-
```yaml :collapsed-lines=6
173-
networks:
174-
fba_network:
175-
external: true
176-
177-
volumes:
178-
fba_static:
179-
external: true
180-
181-
services:
182-
fba_ui:
183-
build:
184-
context: ../
185-
dockerfile: Dockerfile
186-
image: fba_ui:latest
187-
ports:
188-
- "80:80"
189-
- "443:443"
190-
container_name: fba_ui
191-
restart: always
192-
command:
193-
- nginx
194-
- -g
195-
- daemon off;
196-
volumes:
197-
# nginx https conf
198-
# 通过 docker 进行部署时,需要打开此配置项并确保<挂载到容器内的证书文件路径>配置
199-
# 与 nginx conf 中的 ssl 证书文件路径配置一致,如果你直接将 ssl 证书文件 cp
200-
# 到了 docker 容器内,则无需挂载证书文件,直接将它们注释或删除即可
201-
# local_ssl_pem_path:你在服务器存放 ssl pem 证书文件的路径,自行修改
202-
# local_ssl_key_path: 你在服务器存放 ssl key 证书文件的路径,自行修改
203-
# /etc/ssl/xxx.pem:挂载到容器内 ssl pem 证书文件的路径,自行修改
204-
# /etc/ssl/xxx.key:挂载到容器内 ssl key 证书文件的路径,自行修改
205-
- local_ssl_pem_path:/etc/ssl/xxx.pem # [!code warning:2]
206-
- local_ssl_key_path:/etc/ssl/xxx.key
207-
- fba_static:/www/fba_server/backend/static
208-
networks:
209-
- fba_network
210-
```
211-
212-
5. 构建并启动容器
213-
214-
创建网络
215-
216-
```shell:no-line-numbers
217-
docker network create fba_network
218-
```
219-
220-
构建
221-
222-
```shell:no-line-numbers
223-
docker-compose build fba_ui
224-
```
225-
226-
启动
227-
228-
```shell:no-line-numbers
229-
docker-compose run fba_ui
230-
```
231-
232-
:::::
154+
[点击跳转](../../frontend/docker.md)
233155

234156
## 注意事项
235157

docs/changelog.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,31 @@ title: 更新日志
99
的成熟与稳定,更意味着它已完全通过验证,可以安心投入生产环境使用。在未来的版本迭代中,我们将持续为开发者带来更优质的产品体验。敬请期待!🤗
1010
:::
1111

12-
## [v1.4.1](https://github.com/fastapi-practices/fastapi_best_architecture/releases/tag/v1.4.1) - 2025-05-25
12+
## [v1.4.2](https://github.com/fastapi-practices/fastapi_best_architecture/releases/tag/v1.4.2) - 2025-05-29
1313

1414
### What's Changed
1515

16-
* Update changelog for v1.4.0 by [@wu-clan](https://github.com/wu-clan)
17-
in [#621](https://github.com/fastapi-practices/fastapi_best_architecture/pull/621)
18-
* Update the menu path and type columns by [@wu-clan](https://github.com/wu-clan)
19-
in [#622](https://github.com/fastapi-practices/fastapi_best_architecture/pull/622)
20-
* Add the deepwiki badge to README by [@wu-clan](https://github.com/wu-clan)
21-
in [#623](https://github.com/fastapi-practices/fastapi_best_architecture/pull/623)
22-
* Refactor the system token to online users by [@wu-clan](https://github.com/wu-clan)
23-
in [#624](https://github.com/fastapi-practices/fastapi_best_architecture/pull/624)
24-
* Update the token check for logout interface by [@wu-clan](https://github.com/wu-clan)
25-
in [#625](https://github.com/fastapi-practices/fastapi_best_architecture/pull/625)
26-
* Update the token decode for logout interface by [@wu-clan](https://github.com/wu-clan)
27-
in [#629](https://github.com/fastapi-practices/fastapi_best_architecture/pull/629)
16+
* Update changelog for v1.4.1 by [@wu-clan](https://github.com/wu-clan)
17+
in [#630](https://github.com/fastapi-practices/fastapi_best_architecture/pull/630)
18+
* Update non-linked sidebar support by [@wu-clan](https://github.com/wu-clan)
19+
in [#633](https://github.com/fastapi-practices/fastapi_best_architecture/pull/633)
20+
* Update the captcha invalidation error class by [@wu-clan](https://github.com/wu-clan)
21+
in [#634](https://github.com/fastapi-practices/fastapi_best_architecture/pull/634)
22+
* Optimize role-related data processing performance by [@wu-clan](https://github.com/wu-clan)
23+
in [#635](https://github.com/fastapi-practices/fastapi_best_architecture/pull/635)
24+
* Optimize install and build of plugin zip by [@wu-clan](https://github.com/wu-clan)
25+
in [#636](https://github.com/fastapi-practices/fastapi_best_architecture/pull/636)
26+
* Fix auto-increment id for postgres init data by [@huyuwei1996](https://github.com/huyuwei1996)
27+
in [#632](https://github.com/fastapi-practices/fastapi_best_architecture/pull/632)
28+
* Fix: prevent overwriting existing init files in code generator by [@lin-wu-1990](https://github.com/lin-wu-1990)
29+
in [#637](https://github.com/fastapi-practices/fastapi_best_architecture/pull/637)
30+
* Simplify the user info update business by [@wu-clan](https://github.com/wu-clan)
31+
in [#638](https://github.com/fastapi-practices/fastapi_best_architecture/pull/638)
32+
33+
## New Contributors
34+
35+
* [@lin-wu-1990](https://github.com/lin-wu-1990) made their first contribution
36+
in [#637](https://github.com/fastapi-practices/fastapi_best_architecture/pull/637)
2837

2938
::: demo-wrapper title="Full Changelog"
3039
完整日志请查看:[CHANGELOG.md](https://github.com/fastapi-practices/fastapi_best_architecture/blob/master/CHANGELOG.md)

docs/code/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ services:
9999
# 如果你选择单独构建,务必注释或删除此容器脚本
100100
fba_ui: # [!code warning:30]
101101
build:
102-
context: /root/fastapi_best_architecture_ui # 根据 Arco Desgin Pro 项目存放目录修改此路径
102+
context: /root/fastapi_best_architecture_ui # 根据 Vben Admin Antd 项目存放目录修改此路径
103103
dockerfile: Dockerfile
104104
image: fba_ui:latest
105105
ports:

docs/code/nginx.conf

Lines changed: 60 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
# For more information on configuration, see:
2-
# * Official English Documentation: http://nginx.org/en/docs/
3-
# * Official Russian Documentation: http://nginx.org/ru/docs/
4-
51
worker_processes auto;
6-
error_log /var/log/nginx/error.log;
72
pid /run/nginx.pid;
3+
error_log /var/log/nginx/error.log;
84

95
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
106
include /usr/share/nginx/modules/*.conf;
117

128
events {
13-
worker_connections 1024;
9+
worker_connections 8192;
1410
}
1511

1612
http {
17-
1813
include /etc/nginx/mime.types;
1914
default_type application/octet-stream;
2015

@@ -29,6 +24,8 @@ http {
2924

3025
keepalive_timeout 300;
3126

27+
access_log /var/log/nginx/access.log;
28+
3229
# 添加 https conf
3330
# server {
3431
# listen 80;
@@ -40,9 +37,6 @@ http {
4037

4138
server {
4239
# 删除下面两行
43-
44-
45-
4640
# 更新为与上面 server_name 相同
4741
server_name 127.0.0.1;
4842

@@ -59,23 +53,68 @@ http {
5953
root /var/www/fba_ui;
6054

6155
location / {
62-
try_files $uri $uri/ /index.html;
56+
try_files $uri $uri/ /index.html;
6357
}
6458

6559
location /api/v1/ {
66-
proxy_pass http://fba_server:8001;
67-
68-
proxy_set_header Host $http_host;
69-
proxy_set_header X-Real-IP $remote_addr;
70-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
71-
proxy_set_header X-Forwarded-Proto $scheme;
72-
proxy_connect_timeout 300s;
73-
proxy_send_timeout 300s;
74-
proxy_read_timeout 300s;
60+
proxy_pass http://fba_server:8001;
61+
62+
proxy_set_header Host $http_host;
63+
proxy_set_header X-Real-IP $remote_addr;
64+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
65+
proxy_set_header X-Forwarded-Proto $scheme;
66+
proxy_connect_timeout 300s;
67+
proxy_send_timeout 300s;
68+
proxy_read_timeout 300s;
69+
}
70+
71+
location /ws/socket.io/ {
72+
proxy_pass http://fba_server:8001/ws/socket.io/;
73+
74+
proxy_set_header Host $host;
75+
proxy_set_header X-Real-IP $remote_addr;
76+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
77+
proxy_set_header X-Forwarded-Proto $scheme;
78+
proxy_read_timeout 86400s;
79+
proxy_send_timeout 86400s;
80+
81+
# WebSocket 支持
82+
proxy_http_version 1.1;
83+
proxy_set_header Upgrade $http_upgrade;
84+
proxy_set_header Connection "upgrade";
85+
proxy_buffering off;
86+
}
87+
88+
location /flower/ {
89+
proxy_pass http://fba_server:8555;
90+
91+
proxy_set_header Host $http_host;
92+
proxy_set_header X-Real-IP $remote_addr;
93+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
94+
proxy_set_header X-Forwarded-Proto $scheme;
95+
proxy_connect_timeout 300s;
96+
proxy_send_timeout 300s;
97+
proxy_read_timeout 300s;
98+
proxy_redirect off;
99+
100+
# WebSocket 支持
101+
proxy_http_version 1.1;
102+
proxy_set_header Upgrade $http_upgrade;
103+
proxy_set_header Connection "upgrade";
75104
}
76105

77106
location /static/ {
78-
alias /var/www/fba_server/backend/static;
107+
alias /var/www/fba_server/backend/static;
108+
}
109+
110+
location /static/upload/ {
111+
alias /var/www/fba_server/backend/static/upload;
112+
}
113+
114+
error_page 500 502 503 504 /50x.html;
115+
116+
location = /50x.html {
117+
root /usr/share/nginx/html;
79118
}
80119
}
81120
}

0 commit comments

Comments
 (0)