API server for trace.moe
- 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 >= 22.15
- PostgreSQL 17+
- Milvus 2.6.0+
- FFmpeg
- Docker
Install Prerequisites first, then:
git clone https://github.com/soruly/trace.moe-api.git
cd trace.moe-api
npm install
- Copy
.env.exampleto.env - Edit
.envas appropriate for your setup, i.e.VIDEO_PATH. - Change
TRACE_API_SALTto a unique value of at least 32 characters. docker compose up -dnode server.ts
On the first start, it will create all database tables in postgresql and create the collection in milvus.
On every start, it will scan the VIDEO_PATH for new video files (.mp4, .mkv, or .webm) and re-scan the VIDEO_PATH every minute for new video files.
You can use pm2 to run this in background in cluster mode.
Use below commands to start / restart / stop server.
npm run start
npm run stop
npm run reload
npm run restart
npm run delete