Skip to content

kixlab/recipescape_api

Repository files navigation

Recipescape API

Tagger API

How to insert recipes to DB

Prepare DB and create .env file according to env in repo. manage.py and wsgi.py loads environment variables from .env

  1. Install dependencies
pip install -r requirements.txt
  1. Launch Stanford CoreNLP Server
docker run -p 9000:9000 --name coreNLP --rm -it motiz88/corenlp
  1. Run insert script. Let's say that we want to put recipes for potato salad
python manage.py import_recipe --json_dirs ./recipes/potato_salad --name potatosalad
  1. Run cluster script. For dummy cluster,
python manage.py make_cluster --title potatosalad_dummy --dishname potatosalad

Check out recipe_api/management/commans/make_cluster.py and _dummy_cluster.py for writing real clustering scripts

Running locally

python manage.py collectstatic
gunicorn -w 5 recipescape_api.wsgi
caddy

Running using Docker

  1. Restore DB
docker-compose up -d db
cat ${DUMP_FILE} | docker exec -i ${CONTAINER_NAME} psql -Upostgres
  1. Develop mode
docker-compose up
  1. Production Deploy mode
docker-compose -f docker-compose.yml -f docker-compose.deploy.yml up

Recipe API

Quick swagger documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published