An open API service indexing awesome lists of open source software.

https://github.com/laura-barluzzi/search-application

An application that enables logged in users to search words within existing documents
https://github.com/laura-barluzzi/search-application

docker elasticsearch flask mongodb mysql python3

Last synced: 3 months ago
JSON representation

An application that enables logged in users to search words within existing documents

Awesome Lists containing this project

README

          

# Search Application

## Development setup

For running locally, create a file `.env` with the following contents:

```
PORT=8080
FLASK_CONFIG_DEBUG=True
FLASK_CONFIG_PASSWORD_SALT=changeme
FLASK_CONFIG_SECRET_KEY=changeme
MYSQL_USER=changeme
MYSQL_PASSWORD=changeme
MYSQL_ROOT_PASSWORD=changeme
```

Now run `docker-compose up --build` to start MySQL, NGINX, ElasticSearch,
MongoDB and Flask.

## Production setup

For running in production, create a file `.env` with the following contents:

```
PORT=80
FLASK_CONFIG_DEBUG=False
FLASK_CONFIG_PASSWORD_SALT=changeme
FLASK_CONFIG_SECRET_KEY=changeme
MYSQL_USER=changeme
MYSQL_PASSWORD=changeme
MYSQL_ROOT_PASSWORD=changeme
```

Remember to update all the `changeme` placeholders to secure random values!

## Running tests

There are end-to-end tests for the project which can be run with:

```bash
pip3 install requests
python3 test.py
```