Readlabs is a service that centralizes and makes available metadata from CNRS laboratories. It offers a RESTful API accessible via an API key, enabling users to search for and obtain detailed information on laboratories. Data extracted from CNRS Reseda structure database.
Table of content
Data updates are performed manually via Inist-CNRS internal scripts. Data is stored in an elastic index. To access this data, readlabs offers a RESTful API accessible via an API key.
For application administrators, it's possible to manage these keys via the API and a web interface (coming soon).
On the front, a nginx acts as a reverse proxy, redirecting all these services to a single entry point (coming soon).
Each service :
readlabs is made up of several services which are distributed in several docker containers.
git clone https://github.com/ezpaarse-project/readlabs
The tools you need to let readlabs run are :
- docker
- npm
# install dependencies
npm i
# create volume for elastic
docker-compose -f docker-compose.debug.yml run --rm elastic chown -R elasticsearch /usr/share/elasticsearch/
# Start readlabs as daemon
docker-compose -f docker-compose.debug.yml up -d
# Stop readlabs
docker-compose -f docker-compose.debug.yml stop
# Get the status of readlabs services
docker-compose -f docker-compose.debug.yml ps
No test are available (coming soon).
- docker
- Total extracted data does not exceed 2000 rows
You can create an environment file named readlabs.local.env.sh
and export the following environment variables. You can then source readlabs.env.sh
, which contains a set of predefined variables and is overridden by readlabs.local.env.sh
.
Elasticsearch has some system requirements that you should check.
To avoid memory exceptions, you may have to increase mmaps count. Edit /etc/sysctl.conf
and add the following line :
# configuration needed for elastic search
vm.max_map_count=262144
Then apply the changes :
sysctl -p
Before you start readlabs, make sure all necessary environment variables are set.
# Start readlabs as daemon
docker-compose up -d
# Stop readlabs
docker-compose stop
# Get the status of readlabs services
docker-compose ps