Pet project to test FastAPI web fremework
Simple web application. It provides http api and web ui to upload url to image, title and description. After uploading server tries to detect text on image. Finally it stop that data in mongo db, which allows to perform full text search.
- Add edit option.
- Detect image text in async queue.
The simplest way is to use docker compose:
docker compose build
docker compose up
This application reqires authorization, to create a new user use command:
docker compose exec backend python -m image_search.upsert_user admin
Details: Backend is a python application. One can manually build python package from setup.py, see commands sequence in backend/Dockerfile
Frontend is a vuejs + typescript + bootstrap application.
To run dev environment use default vuejs flow
yarn install
yarn run serve
Install python and pip
apt update && apt install -y python3 python3-pip
Create virtualenv
python3 -m pip install venv
python3 -m venv ./venv
source ./venv/bin/activate
Install dependencies
pip install -e ".[dev]"
Create .env file with settings, it is required to provide MONGODB_LOGIN, MONGODB_PASSWORD environment variables Also, one can start mongodb in docker container usig backend/dev/docker-compose.yaml It contains the same configuration of mongodb as main docker-compose.yaml in project's root, but use network_mode: host Run
uvicorn image_search:app