2023-07-21 16:14:35 +08:00
|
|
|
# Dev-Setup
|
2023-04-10 14:52:59 +08:00
|
|
|
|
2023-08-22 17:29:08 +08:00
|
|
|
## Development runtime
|
|
|
|
|
|
|
|
You can use Windows/Linux/Mac for AppMange development if you have Docker and Python3.8 on you machine.
|
2023-04-10 13:36:02 +08:00
|
|
|
|
2023-08-22 17:29:08 +08:00
|
|
|
Then running below commands for development rutime:
|
2023-04-10 14:13:58 +08:00
|
|
|
|
2023-04-10 14:14:23 +08:00
|
|
|
```
|
2023-08-22 17:29:08 +08:00
|
|
|
git clone --depth=1 https://github.com/Websoft9/websoft9.git
|
|
|
|
cd websoft9/appmanage
|
2023-07-20 17:51:24 +08:00
|
|
|
pip install -r requirements.txt
|
2023-04-10 14:14:23 +08:00
|
|
|
```
|
2023-04-10 13:46:02 +08:00
|
|
|
|
2023-08-22 17:29:08 +08:00
|
|
|
You should fork this repository and push your branch to remote repository.
|
|
|
|
|
|
|
|
## Deployment
|
|
|
|
|
|
|
|
This repository only support deployment on Linux:
|
|
|
|
|
|
|
|
1. Install websoft9 on you Linux
|
|
|
|
```
|
|
|
|
wget https://websoft9.github.io/websoft9/install/install.sh && bash install.sh
|
|
|
|
```
|
|
|
|
2. **git clone** your remote repository, and build your AppManage container and running it
|
|
|
|
```
|
|
|
|
cd websoft9/appmanage && docker build -t websoft9dev/appmanage:latest-pr .
|
|
|
|
cd websoft9/docker/appmanage && export APP_VERSION=latest-pr && docker compose up -d
|
|
|
|
```
|
|
|
|
|
2023-08-25 15:47:50 +08:00
|
|
|
## Structure
|
|
|
|
|
|
|
|
### API
|
|
|
|
|
|
|
|
```
|
|
|
|
├── api
|
|
|
|
│ ├── exception
|
|
|
|
│ ├── model -- Data models and database schema
|
|
|
|
│ ├── service -- Controllers
|
|
|
|
│ ├── utils -- Common modules and tools
|
|
|
|
│ └── v1 -- Views
|
|
|
|
```
|
2023-08-24 10:59:39 +08:00
|
|
|
|
|
|
|
### Route
|
|
|
|
|
|
|
|
New API use apps.router, don't create a new route
|
|
|
|
|
|
|
|
### Post method
|
|
|
|
|
|
|
|
Support [get,post] submit
|
|
|
|
|
|
|
|
### API URL
|
2023-04-10 16:39:45 +08:00
|
|
|
|
2023-08-22 15:29:54 +08:00
|
|
|
Access API by: **http://Internet IP:5000/docs**
|
2023-04-11 09:40:16 +08:00
|
|
|
|
2023-07-20 17:51:24 +08:00
|
|
|
### Test Automation
|
2023-04-10 16:39:45 +08:00
|
|
|
|
2023-08-22 17:29:08 +08:00
|
|
|
Coming soon...
|