Skip to content

shotit/shotit-api

Repository files navigation

Shotit-api

License GitHub Workflow Status Codecov Docker Docker Image Size

The ultimate brain of shotit, in charge of task coordination.

Features

  • serve image search request
  • crop black borders on search images
  • rate limiting and user management
  • serve index and database status
  • store and serve compressed hash files
  • distribute hash jobs to workers

Prerequisites

Local Development Guide

Install:

git clone https://github.com/shotit/shotit-api.git
cd shotit-api
yarn install

Install Prerequisites by docker compose first, docker-desktop required:

  • Copy .env.example to .env
  • Edit .env as appropriate for your setup, as is for the first time.
  • Copy milvus.yaml.example to milvus.yaml
  • Edit milvus.yaml as appropriate for your setup, as is for the first time.
(Windows or Mac):
docker compose up -d
(Linux):
docker-compose up -d

Start server

You can use pm2 to run this in background in cluster mode.

Use below commands to start / restart / stop / log server.

yarn start
yarn stop
yarn reload
yarn restart
yarn delete
yarn logs

To change the number of nodejs instances, edit ecosystem.config.json