GarganText is a collaborative web-decentralized-based macro-service
platform for the exploration of unstructured texts. It combines tools
from natural language processing, text-data-mining bricks, complex
networks analysis algorithms and interactive data visualization tools
to pave the way toward new kinds of interactions with your textual and
digital corpora.
GarganText is a collaborative web-decentralized-based macro-service platform for the exploration of unstructured texts. It combines tools from natural language processing, text-data-mining bricks, complex networks analysis algorithms and interactive data visualization tools to pave the way toward new kinds of interactions with your textual and digital corpora.
This software is free (as "Libre" in French) software, developed by the
CNRS Complex Systems Institute of Paris Île-de-France (ISC-PIF) and its
partners.
This software is free (as "Libre" in French) software, developed by the CNRS Complex Systems Institute of Paris Île-de-France (ISC-PIF) and its partners.
GarganText Project: this repo builds the backend for the frontend server built by
GarganText Project: this repo builds the backend for the frontend server built by [backend](https://gitlab.iscpif.fr/gargantext/haskell-gargantext).
## Installation <a name="install"></a>
Disclaimer: since this project is still in development, this document
remains in progress. Please report and improve this documentation if you
encounter any issues.
Disclaimer: since this project is still in development, this document remains in progress. Please report and improve this documentation if you encounter any issues.
#### Prerequisite
...
...
@@ -46,17 +36,12 @@ cd haskell-gargantext
```
#### 1. Installation
This project can be built with either Stack or Cabal. For historical
reasons, we generate a `cabal.project` from the `stack.yaml`, and
we do not commit the former to the repo, to have a single "source of truth".
However, it's always possible to generate a `cabal.project` thanks
to [stack2cabal](https://hackage.haskell.org/package/stack2cabal).
This project can be built with either Stack or Cabal. For historical reasons, we generate a `cabal.project` from the `stack.yaml`, and we do not commit the former to the repo, to have a single "source of truth".
However, it's always possible to generate a `cabal.project` thanks to [stack2cabal](https://hackage.haskell.org/package/stack2cabal).
#### Install Nix
#### Install Nix
Gargantext requires [nix](https://github.com/NixOS/nix) to provide
system dependencies (for example, C libraries), but its use is limited
to that. In order to install [Nix](https://nixos.org/download.html):
Gargantext requires [Nix](https://github.com/NixOS/nix) to provide system dependencies (for example, C libraries), but its use is limited to that. In order to install [Nix](https://nixos.org/download.html):
```shell
sh <(curl -L https://nixos.org/nix/install)--daemon
...
...
@@ -68,9 +53,7 @@ nix-env --version
nix-env (Nix) 2.11.0
```
**Important:** Before building the project with either `stack` or
`cabal` you need to be in the correct Nix shell, which will fetch
all the required system dependencies. To do so, just type:
**Important:** Before building the project with either `stack` or `cabal` you need to be in the correct Nix shell, which will fetch all the required system dependencies. To do so, just type:
NOTE: Default build (with optimizations) requires large amounts of RAM
(16GB at least). To avoid heavy compilation times and swapping out your
machine, it is recommended to `stack build` with the `--fast` flag,
i.e.:
NOTE: Default build (with optimizations) requires large amounts of RAM (16GB at least). To avoid heavy compilation times and swapping out your machine, it is recommended to `stack build` with the `--fast` flag, i.e.:
```shell
stack build --fast
```
#### Build with Cabal
##### Build with Cabal (recommanded)
Once you have a valid version of `cabal`, building requires generating
a valid `cabal.project`. This can be done by installing `stack2cabal`:
Once you have a valid version of `cabal`, building requires generating a valid `cabal.project`. This can be done by installing `stack2cabal`:
```shell
cabal v2-install stack2cabal-1.0.14
...
...
@@ -137,24 +118,24 @@ docker compose up
```
Initialization schema should be loaded automatically (from `devops/postgres/schema.sql`).
#### 2. Then install:
##### (Optional) If using stack, then install:
``` sh
stack install
```
#### 3. Copy the configuration file:
#### 2. Copy the configuration file:
``` sh
cp gargantext.ini_toModify gargantext.ini
```
> Do not worry, `.gitignore` avoids adding this file to the repository by mistake, then you can change the passwords in gargantext.ini safely.
#### 4. A user have to be created first as instance:
#### 3. A user have to be created first as instance:
``` sh
~/.local/bin/gargantext-init "gargantext.ini"
```
Now, `user1` is created with password `1resu`
#### 5. Clone FRONTEND repository:
#### 4. Clone FRONTEND repository:
From the Backend root folder (haskell-gargantext):
We store the repository in directory `repos` in the [CBOR](https://cbor.io/)
file format. To decode it to JSON and analyze, say, using
[jq](https://shapeshed.com/jq-json/), use the following command:
We store the repository in directory `repos` in the [CBOR](https://cbor.io/) file format. To decode it to JSON and analyze, say, using [jq](https://shapeshed.com/jq-json/), use the following command:
Then, shut down the container, replace `image` section in
`devops/docker/docker-compose.yaml` with `postgres:14`. Also, it is a good practice to create a new volume, say `garg-pgdata14` and bind the new container to it. If you want to keep the same volume, remember about removing it like so:
Then, shut down the container, replace `image` section in `devops/docker/docker-compose.yaml` with `postgres:14`. Also, it is a good practice to create a new volume, say `garg-pgdata14` and bind the new container to it. If you want to keep the same volume, remember about removing it like so: