Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
8b6fd332
Commit
8b6fd332
authored
1 year ago
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-177-DoorWelcome-v2' into dev
parents
f4368013
db8c6258
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
31 deletions
+61
-31
README.md
README.md
+48
-31
start
start
+13
-0
No files found.
README.md
View file @
8b6fd332
<div
align=
"center"
><img
height=
"180"
src=
"https://gitlab.iscpif.fr/gargantext/main/images/logo.png"
></div>
<div
align=
"center"
><img
height=
"180"
src=
"https://gitlab.iscpif.fr/gargantext/main/
raw/master/
images/logo.png"
></div>
# Gargantext with Haskell (Backend instance)
# Gargantext with Haskell (Backend instance)
...
@@ -7,11 +7,14 @@
...
@@ -7,11 +7,14 @@
#### Table of Contents
#### Table of Contents
1.
[
About the project
](
#about
)
1.
[
About the project
](
#about
)
2.
[
Example2
](
#example2
)
2.
[
Installation
](
#install
)
3.
[
Third Example
](
#third-example
)
3.
[
Initialization
](
#init
)
4.
[
Fourth Example
](
#fourth-examplehttpwwwfourthexamplecom
)
4.
[
Launch & develop GarganText
](
#launch
)
5.
[
Uses cases
](
#use-cases
)
6.
[
GraphQL
](
#graphql
)
7.
[
PostgreSQL
](
#postgresql
)
## About the project
<a name="about"></a>
## About the project <a name="about"></a>
GarganText is a collaborative web-decentralized-based macro-service
GarganText is a collaborative web-decentralized-based macro-service
platform for the exploration of unstructured texts. It combines tools
platform for the exploration of unstructured texts. It combines tools
...
@@ -28,20 +31,20 @@ GarganText Project: this repo builds the backend for the frontend server built b
...
@@ -28,20 +31,20 @@ GarganText Project: this repo builds the backend for the frontend server built b
[
backend
](
https://gitlab.iscpif.fr/gargantext/haskell-gargantext
)
.
[
backend
](
https://gitlab.iscpif.fr/gargantext/haskell-gargantext
)
.
## Installation
## Installation
<a name="install"></a>
Disclaimer: since this project is still in development, this document
Disclaimer: since this project is still in development, this document
remains in progress. Please report and improve this documentation if you
remains in progress. Please report and improve this documentation if you
encounter any issues.
encounter any issues.
### Prerequisite
###
#
Prerequisite
Clone the project.
Clone the project.
```
shell
```
shell
git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
cd
haskell-gargantext
cd
haskell-gargantext
```
```
### 1. Install Stack
###
#
1. Install Stack
Install
[
Stack (or Haskell Tool Stack)
](
https://docs.haskellstack.org/en/stable/
)
:
Install
[
Stack (or Haskell Tool Stack)
](
https://docs.haskellstack.org/en/stable/
)
:
...
@@ -55,7 +58,7 @@ stack --version
...
@@ -55,7 +58,7 @@ stack --version
Version 2.9.1
Version 2.9.1
```
```
### 2. Install Nix
###
#
2. Install Nix
Install
[
Nix
](
https://nixos.org/download.html
)
:
Install
[
Nix
](
https://nixos.org/download.html
)
:
...
@@ -66,16 +69,16 @@ $ sh <(curl -L https://nixos.org/nix/install) --daemon
...
@@ -66,16 +69,16 @@ $ sh <(curl -L https://nixos.org/nix/install) --daemon
Verify the installation is complete with
Verify the installation is complete with
```
shell
```
shell
$
nix-env
--version
$
nix-env
--version
nix-env
(
Nix
)
2.1
2
.0
nix-env
(
Nix
)
2.1
1
.0
```
```
> **NOTE INFO (upgrade/downgrade if needed)**
> **NOTE INFO (upgrade/downgrade if needed)**
> Gargantext works with Nix 2.1
2
.0 (older version than current 2.13.2). To downgrade your Nix version:
> Gargantext works with Nix 2.1
1
.0 (older version than current 2.13.2). To downgrade your Nix version:
> `nix-channel --update; nix-env -iA nixpkgs.nixVersions.nix_2_1
2
nixpkgs.cacert; systemctl daemon-reload; systemctl restart nix-daemon`
> `nix-channel --update; nix-env -iA nixpkgs.nixVersions.nix_2_1
1
nixpkgs.cacert; systemctl daemon-reload; systemctl restart nix-daemon`
> Upgrading Nix: https://nixos.org/manual/nix/unstable/installation/upgrading.html
> Upgrading Nix: https://nixos.org/manual/nix/unstable/installation/upgrading.html
### 3. Build Core Code
###
#
3. Build Core Code
NOTE: Default build (with optimizations) requires large amounts of RAM
NOTE: Default build (with optimizations) requires large amounts of RAM
(16GB at least). To avoid heavy compilation times and swapping out your
(16GB at least). To avoid heavy compilation times and swapping out your
...
@@ -90,15 +93,11 @@ If the build is finishing without error, you are ready to launch
...
@@ -90,15 +93,11 @@ If the build is finishing without error, you are ready to launch
GarganText! See next step.
GarganText! See next step.
##
# Initialization
##
Initialization <a name="init"></a>
Docker-compose will configure your database and some NLP bricks (such as CoreNLP):
#### 1.
Docker-compose will configure your database and some NLP bricks (such as CoreNLP):
```
sh
```
sh
# If docker is not installed:
# If docker is not installed:
...
@@ -108,30 +107,48 @@ docker compose up
...
@@ -108,30 +107,48 @@ docker compose up
```
```
Initialization schema should be loaded automatically (from
`devops/postgres/schema.sql`
).
Initialization schema should be loaded automatically (from
`devops/postgres/schema.sql`
).
Then install:
#### 2.
Then install:
```
sh
```
sh
stack
--nix
install
stack
--nix
install
```
```
Copy the configuration file:
#### 3.
Copy the configuration file:
```
sh
```
sh
cp
gargantext.ini_toModify gargantext.ini
cp
gargantext.ini_toModify gargantext.ini
```
```
Do not worry,
`.gitignore`
avoids adding this file to the repository by
> Do not worry, `.gitignore` avoids adding this file to the repository by mistake, then you can change the passwords in gargantext.ini safely.
mistake, then you can change the passwords in gargantext.ini safely.
Users have to be created first (
`user1`
is created as instance)
:
#### 4. A user have to be created first as instance
:
```
sh
```
sh
~/.local/bin/gargantext-init
"gargantext.ini"
~/.local/bin/gargantext-init
"gargantext.ini"
```
```
Now,
`user1`
is created with password
`1resu`
Launch GarganText:
#### 5. Clone FRONTEND repository:
```
sh
stack
--nix
exec
gargantext-server
--
--ini
gargantext.ini
--run
Prod
From the Backend root folder (haskell-gargantext):
```
shell
git clone ssh://git@gitlab.iscpif.fr:20022/gargantext/purescript-gargantext.git
```
```
## Use Cases
## Launch & develop GarganText <a name="launch"></a>
From the Backend root folder (haskell-gargantext):
```
shell
./start
```
> The start script runs following commands:
> `docker compose up` to run the Docker for postgresql from devops/docker folder
> `stack --nix exec gargantext-server -- --ini gargantext.ini --run Prod` to run other services
## Use Cases <a name="use-cases"></a>
### Multi-User with Graphical User Interface (Server Mode)
### Multi-User with Graphical User Interface (Server Mode)
...
@@ -139,7 +156,7 @@ stack --nix exec gargantext-server -- --ini gargantext.ini --run Prod
...
@@ -139,7 +156,7 @@ stack --nix exec gargantext-server -- --ini gargantext.ini --run Prod
~/.local/bin/stack
--docker
exec
gargantext-server
--
--ini
"gargantext.ini"
--run
Prod
~/.local/bin/stack
--docker
exec
gargantext-server
--
--ini
"gargantext.ini"
--run
Prod
```
```
Then you can log in with
`user1`
/
`1resu`
.
Then you can log in with
`user1`
/
`1resu`
### Command Line Mode tools
### Command Line Mode tools
...
@@ -169,7 +186,7 @@ stack --nix build --haddock --no-haddock-deps --fast
...
@@ -169,7 +186,7 @@ stack --nix build --haddock --no-haddock-deps --fast
(in
`.stack-work/dist/x86_64-linux-nix/Cabal-3.2.1.0/doc/html/gargantext`
).
(in
`.stack-work/dist/x86_64-linux-nix/Cabal-3.2.1.0/doc/html/gargantext`
).
## GraphQL
## GraphQL
<a name="graphql"></a>
Some introspection information.
Some introspection information.
...
@@ -202,7 +219,7 @@ Playground is located at http://localhost:8008/gql
...
@@ -202,7 +219,7 @@ Playground is located at http://localhost:8008/gql
}
}
}
}
```
```
## PostgreSQL
## PostgreSQL
<a name="pgsql"></a>
### Upgrading using Docker
### Upgrading using Docker
...
...
This diff is collapsed.
Click to expand it.
start
0 → 100755
View file @
8b6fd332
#!/bin/bash
echo
"GarganText: Starting project..."
echo
"GarganText: docker for postgresql database..."
cd
devops/docker
docker compose up
-d
echo
"GarganText: docker for postgresql database [OK]"
cd
../../
echo
"GarganText: gargantext-server with stack and nix..."
stack
--nix
exec
gargantext-server
--
--ini
gargantext.ini
--run
Prod
echo
"GarganText: gargantext-server with stack and nix [OK]"
echo
"GarganText: project stopped."
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment