python -m venv venv; source venv/bin/activate
pip install -r requirements.txt
pip install --upgrade https://github.com/jakubroztocil/httpie/archive/master.tar.gz
export FLASK_APP=manage.py
export FLASK_ENV=development
在初始化前,需要先删除掉db文件和migrations文件夹。
flask db init
flask db migrate
flask db upgrade
flask run
redis-server
celery worker -A app.task.celery_app
http post http://127.0.0.1:5000/api/tasks
http http://127.0.0.1:5000/api/tasks
-
build image
docker build -f docker/Dockerfile -t app:latest .
-
start service
docker-compose -f docker/docker-compose.yaml up -d
-
stop service
docker-compose -f docker/docker-compose.yaml stop
-
destroy service
docker-compose -f docker/docker-compose.yaml rm
- pytest
- coverage