REST API service that provides access to the animal card (advertisment) persistant storage / database
The REST API for the card (lost/found pet advertisement) storage. In practice it communicates with CassandraDB cluster.
The Web app uses this API to fetch pet card images as well as other card data and similarity feature vectors.
If the CassandraDB is empty, upon first request the service will deploy the needed CassandraDB schema (keyspace & tables)
The API is ASP.NET CORE web api written in C# and packaged to be used as Docker image.
All pull requests are checked with CI automation.
Built releases are automatically published to Docker Hub and are ready to use.
The API is intended to be run in Linux container. e.g. with Docker.
You can set the following environmental variables to configer the service:
EnvVar | Description | Example |
---|---|---|
CASSANDRA_ADDRS | endpoint of cassandra | 10.0.4.12:34248 |
KEYSPACE | keyspace to use | kashtanka |
Remark: If you run the service without specifying the Cassandra endpoint, the memory storage will be used. Might be useful for testing and debuging.
You will need to install the following prerequsites to build the repo
- Change dir to the root of the repo
- Run
dotnet run
- Change dir to the root of the repo
- Run
dotnet build
The Dockerfile
in the root of the repo defines the Docker image that creates a production build and prepares the web service to be run in production.