Skip to content

Latest commit

 

History

History
91 lines (56 loc) · 1.79 KB

INSTALL.md

File metadata and controls

91 lines (56 loc) · 1.79 KB

Installation guide

Requirements

  • NodeJs v16, you can use nvm to use the version specify in the .nvmrc file.

Configuration

You can lauch the backend with or withour docker. To configure each of these methods you must have 2 different env file :

  • docker.env
  • .env

Copy and rename docker.env.example and .env.example.

Label depends on 2 other services from the Cour de cassation : dbsder-api and nlp-pseudonymisation-api. You can lauch these services locally to simulate operation close to production or you can disable theses services from env files. In this case these 2 services are emulated by Label with the storage folder. To do so, follow the Add documents you want to annotate step in the reuser guide or just rename the storage-example folder to storage.

Installation and lauch

Install dependencies with:

yarn

Frontend

To lauch the frontend run:

yarn start:client:dev

Then, on your web browser, open http://localhost:55432

Backend

With docker:

Build the backend with:

yarn docker:build:backend

Start the backend with:

yarn docker:start:backend

Without docker:

Start the database:

yarn docker:start:db

Start the backend:

yarn start:backend:dev

Database

You can init database with :

yarn init:db

This script is lauch with the .env configuration.

Launch scripts

Label contains many scripts, they are listed here You can launch scripts with theses commands :

With docker

docker container exec -it label-backend-1 sh -c "cd packages/courDeCassation; sh scripts/runLocalScript.sh ./dist/scripts/myScript.js --myArgument"

Without docker

scripts/runScriptLocally.sh "myScript.js --myArgument"