INPE's OpenSearch is a REST web service made in Flask for search and discovery of EO products produced by INPE.
The system dependencies are: python3-pip python3-dev virtualenv libmysqlclient-dev
The pip requirements are: flask, mysqlclient, sqlalchemy and gunicorn (optional, used only for deployment)
The following commands will clone and install all the dependencies:
git clone http://github.com/mzaglia/opensearchgeo
cd opensearchgeo
./venv.sh
source venv/bin/activate
To run the app, make sure you have the following enviroment variables configured:
PYTHONUNBUFFERED=1
DB_PASS=<db_password>
DB_USER=<db_user>
DB_NAME=<db_name>
DB_HOST=<db_host>
BASE_URL=<base_service_url>
ENCLOSURE_BASE=<base_location_for_the_scenes_products>
For deployment you can follow: How To Serve Flask Applications with Gunicorn and Nginx on Ubuntu 16.04