This guide will help you to install and start the Lires server.
For using it with Docker, please refer to Docker Deployment.
[[toc]]
pip install 'Lires[all]'
- Init submodules
git submodule update --init --recursive
- Compile frontend files
Prerequisites: Node.js, Make
make build
- Install the servers
Prerequisites: C++17 compiler
pip install ".[all]"
- Pull PDF.js viewer
lrs-utils init-pdfjs
Start the microservices with the following commands:
lires registry # the global resource module, for service discovery
lires log # the log service
lires ai # the AI service
lires feed # the feed service
Lires services are designed to be scalable, and can be started with multiple instances (except for the registry service).
::: info
The registry
service is for service discovery, and should be started before other services.
:::
Then, start the gateway server:
lires server # the gateway server
Lires server is a tornado server that provides API for the client (WebUI & CLI) to communicate with, and should be exposed to the internet.
::: details
$LRS_HOME
directory is used for application data storage, by default it is set to ~/.Lires
.
The data directory contains the configuration file, log files, database, cache files...
To start the application with arbitrary data directory, you can run:
LRS_HOME="your/path/here" lires ...
Additionally, various environment variables can be set to customize the behavior of the application. A detailed list of environment variables can be found at here. :::
It will be laborious and error-prone to start multiple servers manually.
Especially when we want to start multiple servers with different configurations.
Instead, we provide a simple script to enable server clustering for easy deployment.
# Generate a template configuration file
lrs-cluster <your/configuration.yaml> --generate
# Edit the configuration file
# ...
# Start the cluster
lrs-cluster <your/configuration.yaml>
The configuration file designates the environment variables, as well as the command line arguments for each server.
On the first run you need to create a user account, which can be done by running the lrs-user
command in the container.
# export LRS_HOME="..."
lrs-user add <username> <password> --admin
For more information, see User management.
There are several management tools for the server, they are all accessible by lrs-<tool_name>
.
A list of all the tools and common tasks can be found in manage.md.