recipe_api
1.0.0
这是一个开源食谱数据库和API。


开始Postgres:
docker-compose up -d postgres
安装Python依赖性:
pip install -r requirements.txt
创建数据库和表:
python manage.py migrate
创建缓存表:
python manage.py createcachetable
为管理员创建超级用户:
python manage.py createsuperuser
刮擦食谱:
python manage.py scrape --urls --recipes --images --ingest
运行Web服务器:
DEBUG=1 python manage.py runserver
URL:http:// localhost:8000
首先克隆回购。
提出一切:
docker-compose up -d
部署前端更新:
git pull
docker-compose up --force-recreate -d recipes
部署前端和后端:
git pull
docker-compose up --build --force-recreate -d recipes
力刮擦:
docker-compose exec recipes python manage.py scrape --urls --recipes --images --ingest --force
清除缓存:
docker-compose exec recipes python manage.py shell
from django.core.cache import cache
cache.clear()