Prepare DB and create .env
file according to env
in repo. manage.py
and wsgi.py
loads environment variables from .env
- Install dependencies
pip install -r requirements.txt
- Launch Stanford CoreNLP Server
docker run -p 9000:9000 --name coreNLP --rm -it motiz88/corenlp
- 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
- 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
python manage.py collectstatic
gunicorn -w 5 recipescape_api.wsgi
caddy
- Restore DB
docker-compose up -d db
cat ${DUMP_FILE} | docker exec -i ${CONTAINER_NAME} psql -Upostgres
- Develop mode
docker-compose up
ProductionDeploy mode
docker-compose -f docker-compose.yml -f docker-compose.deploy.yml up