SEARCCH Backend Subsystems
- Setup a virtual environment
virtualenv -p python3 venv
source venv/bin/activate
- Install project dependencies
pip3 install -r requirements.txt
- Run the app server
# Using flask run
export FLASK_APP=run:app
export FLASK_CONFIG=development
export FLASK_INSTANCE_CONFIG_FILE=config.py
flask run --host=0.0.0.0 --port=80
# Using gunicorn
sudo /home/hardik/.local/bin/gunicorn --config gunicorn_conf.py run:app
- Install MongoDB from this link
- Setup admin and user for zenodo_artifacts collection
- Restore the data for this collection
- To setup schema in empty database
from app import db
db.create_all()
flask db init
# reflects changes made in Flask in the database
flask db migrate
# executes migration and creates the tables
flask db upgrade