Micro-service for storing RDA Tiger deposits and annotations
This service is part of the RDA Tiger initiative and is developed by the Data Archiving and Networked Services (DANS) in the Netherlands. This micro-service is responsible for storing various deposits. It includes the following capabilities:
- CSV seed ingest
- Annotation creation
This repo includes two setups: a production
setup and a local
setup.
The service can use three different .env files: .env.local
, .env.development
, .env.production
.
It is IMPORTANT to note that if multiple .env files are present, it will use them in the following order: local -> development -> production
.
The easiest method is to simply copy the needed file from the .env.example
file:
cp .env.example .env.local
The following prerequisites are needed for the project:
- Valid RabbitMQ instance
- Docker
- Node/pnpm
# The service is set up with pnpm, so make sure to install packages with it.
pnpm install
The required services are included in the docker-compose.yml
file. You can start all needed services with the following command:
# Docker only supports .env files by default, so we need to specify the exact file.
docker compose up --env-file .env.local -d
# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run start:prod
# unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:cov
The project includes a rda.zip simply unzip in a directory like csv
and then run the following command:
note: Don't forget to replace the <PATH_TO_PROJECT> in the command.
curl -X POST http://localhost:3000/seeding -H "Content-Type: multipart/form-data" $(find <PATH_TO_PROJECT>/IST-rda-storage-service/csv -type f -exec echo -n '-F files=@{};type=text/tab-separated-values ' \;)