A basic server in Python using Jinja to implement a basic web interface for searching specified databases in Whoosh! and MongoDB.
The server requires an environment using Python 2.7. The required packages can be installed using:
make install.
Make sure you have ran make install at least once on your machine. Make a copy of the server/config/.env.template and place it in the same directory with the name .env. Now, add your credentials to the server/config/.env file.
Now, simply run the application using make server. The web interface can now be accessed locally with any browser
at http://127.0.0.1:5000.
To completely rebuild the Whoosh! index, run: make index.
To completely rebuild the database, run: make db.
To install the tools, reubuild the database and index, and start the server when done, run make all.
The current version of the application can be found here.
The website is deployed to Azure using a Docker container built with the Dockerfile included in this repository. For fun, this application is hosted on two separate virtual machines using Docker (in swarm mode) and an Azure load balancer.
To run the application locally using Docker, run the following command:
docker run --rm sonoilmedioco/pysearch:v4
The public Docker Hub repo can be found here.