Prepare to lock the legacy branch (#301)

* Prepare to lock the legacy branch

* Update README.md

* Fix typo

* Fix the docker environment file
This commit is contained in:
Wu Clan
2024-03-21 10:56:12 +08:00
committed by GitHub
parent 3b64aeb97b
commit 01ee7deeff
3 changed files with 17 additions and 17 deletions
+7 -9
View File
@@ -5,13 +5,11 @@
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
> [!CAUTION] > [!CAUTION]
> **For 2023-12-21 (announcement)** > **For 2023-12-22 (announcement)**
> >
> The master branch has been fully migrated to pydantic-v2, please pay extra attention to sync fork operations to avoid > The master branch has completed the app architecture refactoring, please pay extra attention to sync fork operations
> irreparable damage! > to avoid irreparable damage!
> We have kept and locked the original branch (pydantic-v1), which you can get in the branch selector > We have kept and locked the original branch (legacy-single-app-pydantic-v2), which you can get in the branch selector
Pydantic-V2 Completed 🎉
English | [简体中文](./README.zh-CN.md) English | [简体中文](./README.zh-CN.md)
@@ -109,7 +107,8 @@ Luckily, we now have a demo site: [FBA UI](https://fba.xwboy.top/)
cp .env.example .env cp .env.example .env
``` ```
6. Database migration [alembic](https://alembic.sqlalchemy.org/en/latest/tutorial.html) 6. Modify the configuration file as needed
7. Database migration [alembic](https://alembic.sqlalchemy.org/en/latest/tutorial.html)
```shell ```shell
cd backend/app/ cd backend/app/
@@ -120,7 +119,7 @@ Luckily, we now have a demo site: [FBA UI](https://fba.xwboy.top/)
# Execute the migration # Execute the migration
alembic upgrade head alembic upgrade head
``` ```
7. Start celery worker and beat 8. Start celery worker and beat
```shell ```shell
celery -A tasks worker --loglevel=INFO celery -A tasks worker --loglevel=INFO
@@ -128,7 +127,6 @@ Luckily, we now have a demo site: [FBA UI](https://fba.xwboy.top/)
celery -A tasks beat --loglevel=INFO celery -A tasks beat --loglevel=INFO
``` ```
8. Modify the configuration file as needed
9. Execute the `backend/app/main.py` file to start the service 9. Execute the `backend/app/main.py` file to start the service
10. Browser access: http://127.0.0.1:8000/api/v1/docs 10. Browser access: http://127.0.0.1:8000/api/v1/docs
+7 -8
View File
@@ -5,12 +5,11 @@
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
> [!CAUTION] > [!CAUTION]
> **2023-12-21 (公告)** > **2024-3-22 (公告)**
> >
> 主分支已完全迁移到 pydantic-v2,请格外注意 sync fork 操作,以免造成不可挽回的损失! > 主分支已完成 app 架构重构,请格外注意 sync fork 操作,以免造成不可挽回的损失!
> 我们保留并锁定了原始分支(pydantic-v1),您可以在分支选择器中找到它 >
> 我们保留并锁定了原始分支(legacy-single-app-pydantic-v2),您可以在分支选择器中找到它
Pydantic-V2 已完工 🎉
简体中文 | [English](./README.md) 简体中文 | [English](./README.md)
@@ -102,7 +101,8 @@ mvc 架构作为常规设计模式,在 python web 中也很常见,但是三
cp .env.example .env cp .env.example .env
``` ```
6. 数据库迁移 [alembic](https://alembic.sqlalchemy.org/en/latest/tutorial.html) 6. 按需修改配置文件
7. 数据库迁移 [alembic](https://alembic.sqlalchemy.org/en/latest/tutorial.html)
```shell ```shell
cd backend/app/ cd backend/app/
@@ -114,7 +114,7 @@ mvc 架构作为常规设计模式,在 python web 中也很常见,但是三
alembic upgrade head alembic upgrade head
``` ```
7. 启动 celery worker 和 beat 8. 启动 celery worker 和 beat
```shell ```shell
celery -A tasks worker --loglevel=INFO celery -A tasks worker --loglevel=INFO
@@ -122,7 +122,6 @@ mvc 架构作为常规设计模式,在 python web 中也很常见,但是三
celery -A tasks beat --loglevel=INFO celery -A tasks beat --loglevel=INFO
``` ```
8. 按需修改配置文件
9. 执行 `backend/app/main.py` 文件启动服务 9. 执行 `backend/app/main.py` 文件启动服务
10. 浏览器访问:http://127.0.0.1:8000/api/v1/docs 10. 浏览器访问:http://127.0.0.1:8000/api/v1/docs
+3
View File
@@ -25,3 +25,6 @@ RABBITMQ_PASSWORD='guest'
TOKEN_SECRET_KEY='1VkVF75nsNABBjK_7-qz7GtzNy3AMvktc9TCPwKczCk' TOKEN_SECRET_KEY='1VkVF75nsNABBjK_7-qz7GtzNy3AMvktc9TCPwKczCk'
# Opera Log # Opera Log
OPERA_LOG_ENCRYPT_SECRET_KEY='d77b25790a804c2b4a339dd0207941e4cefa5751935a33735bc73bb7071a005b' OPERA_LOG_ENCRYPT_SECRET_KEY='d77b25790a804c2b4a339dd0207941e4cefa5751935a33735bc73bb7071a005b'
# OAuth2
OAUTH2_GITHUB_CLIENT_ID='test'
OAUTH2_GITHUB_CLIENT_SECRET='test'