The ultimate brain of shotit, in charge of task coordination.
- 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
- Node.js 16.x, 18.x
- mariaDB 10.4.x
- redis
- liresolr
- milvus-standalone
- milvus-minio
- milvus-etcd
- shotit-searcher
- shotit-sorter(optional)
- g++, cmake (if you need to compile OpenCV)
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
tomilvus.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
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