OARD (An acronym form of "oh alright"): an Open real-world based Annotation for Rare Diseases and its associated phenotypes
This is a Flask app to serve the backend API of OARD. Currently it is hosted on the NCATS AWS server (https://rare.cohd.io/). This repo currenly only have the Flask API part. The fron end React web app is hosted in another repo. We expect to merge two repos in the near future.
The architecture of this web API is largely adopted from an exisitng project called COHD
To install
pip -r requirement.txt
The API is served using FLASK:
FLASK_APP=cohd.py flask run
OARD is served on an AWS EC2 instance using Nginx and uWSGI. For consistency, use the approach in the following blog post
Caveats:
- If using virtualenv, you either have to have the virtualenv directory in the same location as the cohd.py application, or specify the location of the virtualenv using the
uWSGI -H
parameter.
Please see here
Please see here
/var/cohd-rare/
has the code/var/cohd-rare/cohd/cohd.ini
– uwsgi configuration for running the app/var/cohd-rare/cohd/cohd_flask.conf
– flask configuration/var/cohd-rare/cohd/database.cnf
– mysql database configuration file. Currently using the main cohd database. Should be changed when you have the new database up/var/cohd-rare/cohd/venv
– virtualenv location/var/log/uwsgi/cohd-rare.log
– log file/etc/system/system/cohd-rare.service
– system configuration (already set to automatically start on boot)sudo systemctl <start|stop|restart> cohd-rare
restart after python code changes to app/etc/nginx/sites-available/cohd-rare
– nginx configurationsudo systemctl restart nginx
- restart nginx- If you make changes
Test configuration changes without applying:
sudo nginx -t
Apply configuration changes:sudo service nginx reload