Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

README UPDATE #146

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions README.ZH_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,43 @@ DongTai-WebAPI 用于处理DongTai用户资源管理的相关请求,包括:

**源码部署**

1.初始化数据库
1.安装所需的依赖

```
python -m pip install -r requirements-test.txt
```

2.初始化数据库

- 安装MySql 5.7,创建数据库`DongTai-webapi`,运行数据库文件`conf/db.sql`
- 进入`webapi`目录,运行`python manage.py createsuperuser`命令创建管理员

2.修改配置文件
或采用docker部署数据库
- 拉取版本对应的数据库镜像并启动镜像
```
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-mysql:latest
docker run -itd --name dongtai-mysql -p 3306:3306 registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-mysql:latest
```


3.修改配置文件

- 复制配置文件`conf/config.ini.example`为`conf/config.ini`并需改其中的配置;其中,`engine`对应的url为`DongTai-engine`的服务地址,`apiserver`对应的url为`DongTai-openapi`的服务地址

3.运行服务
4.运行服务

- 运行`python manage.py runserver`启动服务

**容器部署**

1.初始化数据库

- 安装MySql 5.7,创建数据库`DongTai-webapi`,运行数据库文件`conf/db.sql`
- 进入`webapi`目录,运行`python manage.py createsuperuser`命令创建管理员
- 拉取版本对应的数据库镜像
```
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-mysql:latest
docker run -itd --name dongtai-mysql -p 3306:3306 registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-mysql:latest
```


2.修改配置文件

Expand Down
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DongTai-webapi
# DongTai-webap2
[![django-project](https://img.shields.io/badge/django%20versions-3.0.3-blue)](https://www.djangoproject.com/)
[![DongTai-project](https://img.shields.io/badge/DongTai%20versions-beta-green)](https://huoxianclub.github.io/LingZhi/)
[![DongTai--webapi](https://img.shields.io/badge/DongTai--webapi-v1.0.5-lightgrey)](https://huoxianclub.github.io/LingZhi/#/doc/tutorial/quickstart)
Expand Down Expand Up @@ -27,16 +27,32 @@ DongTai-WebAPI is used to user resource management ,including:

**Source code deployment**

1.Initialize the database
1.Install the required dependencies

```
python -m pip install -r requirements-test.txt
```

2.Initialize the database

- Install MySql 5.7, create the database `DongTai-webapi`, and run the database file `conf/db.sql`
- Enter the `webapi` directory and run the `python manage.py createsuperuser` command to create an administrator

2.Modify the configuration file
OR use docker way to host a database

- Pull the corresponding database images and run it
```
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-mysql:latest
docker run -itd --name dongtai-mysql -p 3306:3306 registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-mysql:latest
```



3.Modify the configuration file

- Copy the configuration file `conf/config.ini.example` to `conf/config.ini` and change the configuration; the url corresponding to `engine` is the service address of` DongTai-engine`, and the url corresponding to `apiserver` is the service address of `DongTai-openapi`

3.Run the service
4.Run the service

- Run `python manage.py runserver` to start the service

Expand All @@ -45,8 +61,12 @@ DongTai-WebAPI is used to user resource management ,including:

1.Initialize the database

- Install MySql 5.7, create the database `DongTai-webapi`, and run the database file `conf/db.sql`
- Enter the `webapi` directory and run the `python manage.py createsuperuser` command to create an administrator
- Pull the corresponding database images and run it

```
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-mysql:latest
docker run -itd --name dongtai-mysql -p 3306:3306 registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-mysql:latest
```

2. Modify the configuration file

Expand Down