This moleculer-based microservice houses endpoints for the following functions:
- Local import of a comic library into mongo (currently supports
cbr
andcbz
files) - Metadata extraction from file,
comicinfo.xml
- Mongo comic object orchestration
- CRUD operations on
Comic
model - Helper utils to help with image metadata extraction, file operations and more.
-
You need the following dependencies installed:
mongo
,elasticsearch
andredis
-
You also need binaries for
unrar
andp7zip
-
Clone this repo
-
Run
npm i
-
Assuming you installed the dependencies correctly, run:
COMICS_DIRECTORY=<PATH_TO_COMICS_DIRECTORY> \ USERDATA_DIRECTORY=<PATH_TO_USERDATA_DIRECTORY> \ REDIS_URI=redis://<REDIS_HOST:REDIS_PORT> \ ELASTICSEARCH_URI=<ELASTICSEARCH_HOST:ELASTICSEARCH_PORT> \ MONGO_URI=mongodb://<MONGO_HOST:MONGO_PORT>/threetwo \ UNRAR_BIN_PATH=<UNRAR_BIN_PATH> \ SEVENZ_BINARY_PATH=<SEVENZ_BINARY_PATH> \ npm run dev
to start the service
-
You should see the service spin up and a list of all the endpoints in the terminal
-
The service can be accessed through
http://localhost:3000/api/<serviceName>/*
- Build the image using
docker build . -t frishi/threetwo-import-service
. Give it a hot minute. - Run it using
docker run -it frishi/threetwo-import-service