Animal scanner backend is a RESTful API powering Animal Scanner frontend. It integrates Nominatim API for geosearch and uses PostgreSQL database server.
- Install docker on your system
- Clone this repo and open its directory in file explorer
- Open terminal in said directory
- Enter these commands
cd docker
docker compose up -d
- Swagger UI should be accessible by default under
http://localhost:8080/docs
Config file is named config.ini
and it contains all the changeable settings for the API. Defined parameters are:
- server section
- host - host address of the API, default is 127.0.0.1
- port - port of the API, default is 8081
- prefix - prefix of the API, default is "/api/v1"
- allow_origins - list of allowed origins, default is * (all)
- allow_methods - list of allowed origins, default is * (all)
- allow_headers - list of allowed origins, default is * (all)
- docs - enable/disable swagger docs available under
host\port\docs
, default is 1 (on) - redoc - enable/disable redoc docs available
host\port\redoc
, default is 1 (on)
- database section
- host
- port
- user
- password
- db_name
- connect_attempts - number of connection attempts
- auth section
- _token_secret - base key for generating token
- _token_exp_min - length of token time to live
- email section
- smtp_server - smtp server provider
- smtp_port
- user
- password
- sender_name
- config section
- upload_dir - directory for uploaded photos