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
สร้าง superuser สำหรับผู้ดูแลระบบ:
python manage.py createsuperuser
สูตรขูด:
python manage.py scrape --urls --recipes --images --ingest
เรียกใช้เว็บเซิร์ฟเวอร์:
DEBUG=1 python manage.py runserver
URL: http: // localhost: 8000
โคลน repo ก่อน
นำทุกอย่างขึ้นมา:
docker-compose up -d
ปรับใช้การอัปเดต front-end:
git pull
docker-compose up --force-recreate -d recipes
ปรับใช้ด้านหน้าและด้านหลัง:
git pull
docker-compose up --build --force-recreate -d recipes
Force Scrape:
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()