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()