快速上手

配置项目信息

Copy config.example.py as config.py and change database and redis configuration in it.

Docker 启动

Build Docker Image

docker build -t tefact .

Run it

docker run -it -p 5000:5000 --name terfact-run -d Tefact

手动启动

!! NodeJS = 12.2.0 !!

安装后端依赖
  1. 创建 Python 虚拟环境(可选)
pip install virtualenv

virtualenv venv
source venv/bin/activate  
  1. 安装 Python 依赖
pip install -r requirements.txt
  1. 启动后端服务
python main.py

安装前端依赖

cd admin
npm install

开启开发版本控制台前端

npm run dev

打开浏览器: http://localhost:8800/

修改数据库

Generate an initial migration:

python manage.py db migrate

Then you can apply the migration to the database:

python manage.py db upgrade

Init Plugin Config

./bin/startup.sh

Init product structure data

python manage.py init-data